Last active
May 18, 2017 22:35
-
-
Save ddrscott/1b3a1ff5dfbaef5ca8676927bb834312 to your computer and use it in GitHub Desktop.
`v<Space>` zsh binding as a shortcut for `vim <CTRL-T>some_file_name<Enter>`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
v-space-widget(){ | |
zle self-insert; | |
if [[ $LBUFFER == 'v ' ]]; then | |
zle fzf-file-widget && zle accept-line | |
fi | |
} | |
zle -N v-space-widget | |
bindkey ' ' v-space-widget | |
alias v='vim' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Demo:
