Double-clicking a source or config file in Finder opens it in Neovim inside a new iTerm2 window. Selecting multiple files opens them as tabs in a single window (nvim -p).
- iTerm2
- Neovim (
nvimon$PATH) - duti:
brew install duti
| question | answer | |
|---|---|---|
| izquierda | left | |
| derecha | right | |
| recto | straight | |
| norte | north | |
| sur | south | |
| este | east | |
| oeste | west | |
| arriba | up | |
| abajo | down |
(Based on info from Peter Downs' gitub but with modified behavior to open a new terminal window for each invocation instead of reusing an already open window.)
The following three ways to launch an iTerm2 window from Finder have been tested on iTerm2 version 3+ running on macOS Mojave+.
pdanford - April 2020
| c(){ | |
| # Stage only modified files | |
| # This ignores new/untracked files | |
| git add -u . | |
| # Use CTRL+D to end commit message | |
| local COMMIT_MSG=$(cat) | |
| if [[ -z "$COMMIT_MSG" ]]; then | |
| return |
| #!/usr/bin/env bash | |
| # Bash strict mode | |
| # Error on undefined variable: -u | |
| # Exit on ERR: -e | |
| # Functions inherit ERR traps: -E | |
| # Exit on pipe failures: -o pipefail | |
| set -eEuo pipefail | |
| # Directory of this script | |
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
| @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */ | |
| /* Placing the config file */ | |
| /* Go to about:support address, find Profile folder, open it */ | |
| /* Create an empty directory named `chrome` in that */ | |
| /* Add this file in that directory with name userChrome.css */ | |
| /* Activating the configuration */ | |
| /* Go to address about:config, then set => toolkit.legacyUserProfileCustomizations.stylesheets: true */ |
| # vim:set ft=sh: | |
| backup_neovim(){ | |
| /usr/local/bin/nvim -S $DOTFILES/vim/plug_snapshot.vim | |
| } | |
| restore_neovim(){ | |
| /usr/local/bin/nvim -S $DOTFILES/vim/nvim.lock | |
| } |
| #!/usr/bin/env python3 | |
| # Assumes you have Python 3 and boto3 installed in your [virtual]env | |
| # Assumes we are taking positional parameters (this script could be longer with argparse) | |
| # Assumes you have AWS_PROFILE and AWS_DEFAULT_REGION set and credentials are valid and not expired at ~/.aws/credentials | |
| import boto3 | |
| import json | |
| from sys import argv, exit | |
| if len(argv) != 3: |
kubectl with proper ~/.kube/config that can connect to your clusterkubectl clientkubectl does port forwarding to sshd port of your pod. I'm using pm2 process managed to keep my services alive in my workstation container. If you have only sshd, easiest to use is dropbearProxyCommand of OpenSSH client uses socat to redirect two way fd - to forwarded port of kubectlCopy Paste (CTRL+C) command doesn't work for Linux terminals as CTRL+C is used for SIGINT signal to stop/interrupt works on Linux shell.
You are on Windows but need to have Linux shell like bash or zsh and using one of popular terminal emulators