forked from extern/ohmyzsh
2.3 KiB
2.3 KiB
vi-mode
This plugin increase vi-like
zsh functionality.
Use ESC
or CTRL-[
to enter Normal mode
.
History
ctrl-p
: Previous command in historyctrl-n
: Next command in history/
: Search backward in historyn
: Repeat the last/
Mode indicators
Normal mode is indicated with red <<<
mark at the right prompt, when it
wasn't defined by theme.
Vim edition
v
: Edit current command line in Vim
Movement
$
: 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
Insertion
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
Delete and Insert
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