099246dd9e74f7a2488fe7c51fe8c40502295def
- Author
- Daniel Campoverde [alx741] <alx741@riseup.net>
- Committer
- Daniel Campoverde [alx741] <alx741@riseup.net>
- Date
Message
PLUGINS: vi-mode: allow ctrl-p, ctrl-n for history navigation
Allow ctrl-p, ctrl-n for history navigation while in insert mode.
Diff
1diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh
2index f2745b409097c6cdf6c5a02069728e8b18f2f632..45ec22a095b1e926d71a1ae3a072835f3856f544 100644
3--- a/plugins/vi-mode/vi-mode.plugin.zsh
4+++ b/plugins/vi-mode/vi-mode.plugin.zsh
5@@ -34,6 +34,10 @@ bindkey -v
6 autoload -Uz edit-command-line
7 bindkey -M vicmd 'v' edit-command-line
8
9+# allow ctrl-p, ctrl-n for navigate history (standard behaviour)
10+bindkey '^P' up-history
11+bindkey '^N' down-history
12+
13 # if mode indicator wasn't setup by theme, define default
14 if [[ "$MODE_INDICATOR" == "" ]]; then
15 MODE_INDICATOR="%{$fg_bold[red]%}<%{$fg[red]%}<<%{$reset_color%}"