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
Ondřej Procházka edited this page Feb 18, 2025
·
4 revisions
Welcome to the rpi-setup wiki!
Vim cheat-sheet
The list of commands I like using but always do not remember...
Investigate Warning or Error in code
To investigate error/warning lines, use
:lopen
moving between errors is done by:lnext to jump to the next error, or :lprev, or ]l and [l (those are lowercase Ls) if you have vim-unimpaired, which you do, because you shouldn't use Vim without it...
Finding phrase/function definition through files
vimgrep /<something>/g ./<path>
Compare files (diff)
vimdiff <file1> <file2>
dp --- diffput: puts changes under the cursor into the other file making them identical (thus removing the diff).
do --- diffget: (o => obtain). The change under the cursor is replaced by the content of the other file making them identical.