⚠️ this repository was transferred to another owner: sineto/vi-mode.
This plugin increase vi-like
zsh functionality.
Use ESC
or CTRL-[
to enter Normal mode
.
ctrl-p
: Previous command in historyctrl-n
: Next command in history/
: Search backward in historyn
: Repeat the last/
Home
: Go to the beginning of lineEnd
: Go to the end of line
Mark at the right prompt, when it wasn't defined by theme:
- Normal mode is indicated with green
[N]
- Insert mode is indicated with blue
[I]
v
: Edit current command line in Vim
$
: To the end of the line^
: To the first non-blank character of the line0
: To the first character of the linew
: [count] words forwardW
: [count] WORDS forwarde
: Forward to the end of word [count] inclusiveE
: Forward to the end of WORD [count] inclusiveb
: [count] words backwardB
: [count] WORDS backwardt{char}
: Till before [count]'th occurrence of {char} to the rightT{char}
: Till before [count]'th occurrence of {char} to the leftf{char}
: To [count]'th occurrence of {char} to the rightF{char}
: To [count]'th occurrence of {char} to the left;
: Repeat latest f, t, F or T [count] times,
: Repeat latest f, t, F or T in opposite direction
i
: Insert text before the cursorI
: Insert text before the first character in the linea
: Append text after the cursorA
: Append text at the end of the lineo
: Insert new command line below the current oneO
: Insert new command line above the current one
ctrl-h
: While in Insert mode: delete character before the cursorctrl-w
: While in Insert mode: delete word before the cursord{motion}
: Delete text that {motion} moves overdd
: Delete lineD
: Delete characters under the cursor until the end of the linec{motion}
: Delete {motion} text and start insertcc
: Delete line and start insertC
: Delete to the end of the line and start insertr{char}
: Replace the character under the cursor with {char}R
: Enter replace mode: Each character replaces existing onex
: Delete [count] characters under and after the cursorX
: Delete [count] characters before the cursor
Integration with zsh-history-substring-search
ctrl-j
: Select the newer command that contains in your command historyctrl-k
: Select the older command that contains in your command history
obs.: these commands works only in insert
mode.