https://theprimeagen.github.io/vim-fundamentals/
:echo stdpath("config")
// get the path
:set scrolloff=8
:set relativenumber
or :set rnu
:set number
d6j
delete 6 down in relative number mode
V6jd
highlight and delete 6 down line
Ctrl+w
window mode and then v
for vertical, s
for split horizontal
Place cursor on line and then m + <lowercase>
Place cursor on line and then m + <uppercase>
Navigating between bookmarks
' <caseletter>'
Note: lowercase only works within the file (it is local)
Ctrl + 6
Ctrl + o
Ctrl + i
Shift + d
delete everything to right of cursor in a line.
:Files
While in this mode Ctrl + n
goes next in the list Ctrl + p
will go previous in the list
:GFiles
While in this mode Ctrl + n
goes next in the list Ctrl + p
will go previous in the list
Search some keyword in whole project folder and fix/edit them by keeping all files in a quick fix list.
:grep SOCKET **/*.c
Press Enter
:cnext
to move to next result
:cprev
to jump to previous result
You can remap :cnext
and :cprev
to C-j
and C-k
How to see quick fix list again? Use :copen
We can also pipe changes, macro to all quick fix list using :cdo
and wa
:/<keyword>
n
to go to next search
N
get back
di"