Skip to content

Instantly share code, notes, and snippets.

@thisivan
Created February 11, 2011 22:07
Show Gist options
  • Save thisivan/823138 to your computer and use it in GitHub Desktop.
Save thisivan/823138 to your computer and use it in GitHub Desktop.
Enable Vim mode in ZSH
# Enable Vim mode in ZSH
bindkey -v
autoload -U edit-command-line
zle -N edit-command-line
bindkey '^E' edit-command-line # Opens Vim to edit current command line
bindkey '^R' history-incremental-search-backward # Perform backward search in command line history
bindkey '^S' history-incremental-search-forward # Perform forward search in command line history
bindkey '^P' history-search-backward # Go back/search in history (autocomplete)
bindkey '^N' history-search-forward # Go forward/search in history (autocomplete)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment