Created: 2023-02-05 20:14
Horizontal
f
/t
move to a character on the current line (forward/backward respectively)F
/T
move before a character on the current line (forward/backward respectively);
/,
repeat the motion (forward/backward respectively)
Vertical
{
/}
=> move one paragraph up/downCtrl + d
/Ctrl + u
jumps half a page up/down. This could be coupled withzz
, which centers the view to always land in the middle of the screenG
/gg
go to the bottom/top of the file.
nnoremap("<C-d>", "<C-d>zz")
nnoremap("<C-d>", "<C-d>zz")
Search
/
search forward?
search backwardsn
/N
go to the next/prev result, which is inverted when searching backwards.*
searches the word under the cursor
Searching movement can be coupled with zz
to center and zv
to unfold.
nnoremap("n", "nzzzv")
nnoremap("N", "Nzzzv")