If you have the vim-surround plugin installed:
- To replace surrounding symbols
cs"'(will replace surrounding double quotes by single) - To delete surrounding delimiters
ds((Will remove surrounding parentheses)
bis a text object for a bracket so you can do things likedabto delete around parrenthesis instead ofda(,dibto delete inside,cibto change inside and so on ...
-
{count} +moves count lines down to the beggining of the line -
{count} -moves count lines up to the beggining of the line -
gdgo to local declaration -
*search forward for word under the cursor -
#search backward for word under the cursor -
To move through the Jumplist (each position to which your cursor jumped):
ctrl-oto move backwardsctrl-ito move forwards
-
To move through Changelist (the position for every change you can undo):
g;to move backwardsg,to move forwards
m{a-zA-Z}sets a custom mark whose exact location can be accessed using `{mark}- Certains marks are special `. jumps to the last change
:windo difftwill show the diff between two windows:e!discards edits since last save and reloads the file]mmoves to the next curly brace
To move between splits:
ctrl-w jmoves to the top splitctrl-w hmoves to the left splitctrl-w kmoves to the bottom splitctrl-w lmoves to the right split
Once you have split your screen, how can you rearrange your splits? It’s easy with ctrl-w:
ctrl-w Jmoves the active to the topctrl-w Hmoves the active split to the leftctrl-w Kmoves the active split to the bottomctrl-w Lmoves the active split to rightctrl-w rrotates splits to the right/downctrl-w Rrotates splits to the left/up