You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 2, 2022. It is now read-only.
- to print a digraph symbol (non-printable on keyboard) while in insert mode
K
- works like 'man' command, so uses highlighted text as the keywords
File
ZZ
- close the window and commit changes
Information [Normal mode]
<C-d>
- show the list of commands, that starts the same
<Tab>
- complete the command
<Esc>
- abort the command
<C-g>
- to show your location in a file and file status (g + <C-g)
Regular expressions
^
- beginning of the line
$
- end of the line
.
- match any single character
\[character]
- turn off the special meaning of the character
Movement [Normal mode]
h
- left
l
- right
j
- down
k
- up
$
- end of the line, 2$ - next line, 3$ ..., also <End>, <kEnd>
0
- beginning of the line, also <Home>, <kHome>
^
- first non-blank character
ENTER [link]
- goto the link
G
- goto the bottom of the file
gg
- goto the beginning of the file
[number] G
- goto the line of number
%
- when on brackets jumps on them ( -> ) works with: [], {}, ()
e
- end of this word (or next word)
w
- to the beginning of the next word.
b
- back one word (like w)
t[char]
- jump not including [char]
T[char]
- jump not including [char] reverse
f[char]
- jump including [char]
F[char]
- jump including [char] reverse
<C-y>
- Scrolling up without moving cursor
<C-e>
- Scrolling down without moving cursor
Jumping
<C-u>
- scroll you down half the screen (up you)
<C-d>
- scroll you up the screen (down you)
<C-o>
- jump back in jump-list
<C-i>
- jump forward in jump-list
<C-]>
- go to the hyperlink
<C-t>
- get back (pop the tag off)
Windows
<C-w> w
- move the cursor to the window which is down in loop
<C-w><C-w>
- same
<C-w> j
- move the cursor to the window which is down
<C-w> k
- move the cursor to the window which is up
[count]<C-w>+
- increase the count of lines by 10 in opened window
[count]<C-w>-
- decrease by count
<C-w>=
- makes all windows the same size
[count]<C-w>_
- makes the current window count lines high to count
Searching
/[sequence]
- search for the sequence and goto it (you need to put / before .*[]ˆ%/\?~$ symbols use them in find field.) Also has the search history /<Up> to search the previous request
?
- use instead of / to search from in the backward
n or /<Enter>
- search for the same phrase again
N
- search for in the opposite direction
Switching-Modes
<C-o>
- escapes INSERT to do one NORMAL-mode command, after returns to INSERT mode
ESC \ <C-[>
- goto NORMAL mode
<C-c>
- just go to NORMAL mode (commands before acts like they are in insert mode)
v
- goto VIEW mode (After pressing : you could do something with highlighted text)
V
- goto VIEW-LINE mode
R
- goto REPLACE mode from NORMAL
Edit commands [Normal mode]
Edit command: operation + [count] + motion.
Edit (Operations) [Normal mode]: " can use counts (3a!) = (a + !!!)
i
- before character (goto INSERT mode from NORMAL)
a
- after the cursor (goto INSERT mode from NORMAL)
A
- append the line (goto INSERT mode)
x
- delete the symbol
d
- delete the symbol/word
d [number] d
- delete whole line
[number] dd
- execute number of commands
u
- undo the command
U
- fix whole line
<C-r>
- redo the last change (undo undos)
r
- replace character under the cursor
R
- replace until something (goto replace mode)
~
- change the character case (inv you are on)
c
- delete the chars and goto insert mode (cw - delete the word up to the space, but dw deletes the word AND space)
c [space]
- delete the char and goto INSERT mode
c [move]
- delete the [move] and goto INSERT mode [ex. cw - rem. one word in what you stay]
cc
- same idea like with dd. (deletes whole line)
o
- open the line below (create a new line) and place you in insert mode on this line
O
- open the line upper
p
- put the line after the cursor (from vim register)
P
- put the text before the cursor
y
- yank (copy)
yy or Y
- yank the whole line
y [move]
- yank one word
[count]J
- join the lines
d3w - delete three words 3dw - delete one word three times
Motions
Can use counts before command
$ \ Shift
- to the end of the line
e
- to the end of this word
w
- to the beginning of the next word
f
- up to the symbol
b
- one word back
f<*char>
- jump on the *char forward
F<*char>
- jump on the *char backward
t<*char>
- jump up to the *char forward
T<*char>
- jump up to the *char backward
Macros
qa
- start recording macros, where a is a register [a-z] where you can put this macros