Skip to content

Instantly share code, notes, and snippets.

@atreya2011
Forked from thisivan/.zshrc
Created October 13, 2020 01:21
Show Gist options
  • Save atreya2011/65c745865eedf13064642e70963a2c72 to your computer and use it in GitHub Desktop.
Save atreya2011/65c745865eedf13064642e70963a2c72 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