Created
July 21, 2016 17:13
-
-
Save gilbertw1/20aa14bf2f56da699bb39752ccf21b66 to your computer and use it in GitHub Desktop.
zsh vim mode settings
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
# Enable VIM Mode | |
bindkey -v | |
# Remove Mode Change Delay | |
export KEYTIMEOUT=1 | |
# Add Some Emacs Keybindings | |
bindkey '^p' up-history | |
bindkey '^n' down-history | |
bindkey '^w' backward-kill-word | |
bindkey '^f' autosuggest-accept | |
bindkey '^u' backward-kill-line | |
bindkey '^a' beginning-of-line | |
bindkey '^e' end-of-line | |
# Fix ESC-/ Chord (Perform Search) | |
vi-search-fix() { | |
zle vi-cmd-mode | |
zle .vi-history-search-backward | |
} | |
autoload vi-search-fix | |
zle -N vi-search-fix | |
bindkey -M viins '\e/' vi-search-fix | |
# Fix Backspace | |
bindkey "^?" backward-delete-char |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment