dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 95b925a7b2110c2c169197aaaf8f51abfcf1cff1
parent a30f299c7c6f45f65b479d40773e81f8949a322d
Author: Anders Damsgaard <andersd@riseup.net>
Date:   Fri, 20 Oct 2017 21:36:30 -0400

zsh: add ctrl-e for vim, ctrl-f for vim+fzf

Diffstat:
Mlinks/.zshrc | 17+++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)

diff --git a/links/.zshrc b/links/.zshrc @@ -52,6 +52,23 @@ bindkey '^R' history-incremental-search-backward bindkey "^j" history-beginning-search-backward bindkey "^k" history-beginning-search-forward +# launch $EDITOR with Ctrl-e +_editor() { + #$SHELL -c $EDITOR + BUFFER="$EDITOR" + zle accept-line +} +zle -N _editor +bindkey '^e' _editor + +# launch vim+fzf with Ctrl-f +_editor() { + BUFFER="vim -c ':FZF'" + zle accept-line +} +zle -N _editor +bindkey '^f' _editor + if [[ "$ARCH" != 'Darwin' ]]; then function open() { xdg-open $1 &> /dev/null &disown; } function say() { echo "$@" | festival --tts; }