Save and exit
Move to start of previous paragraph or code block:
Move to end of next paragraph or code block:
Move forward one screenful: CTRL F.
Move backward one screenful: CTRL B.
Jump back to the previous (older) location: CTRL O
Jump forward to the next (newer) location: CTRL I or also TAB.
Move to the first line in a file:
Move to the last line in a file:
Create a mark labeled as a:
Go to mark a:
Usually I create a mark labeled as m: typing
mm and then
'm is faster.
- Start recording a macro labeled as a:
- Execute a sequence of commands you want to repeat.
- Stop recording macro:
Invoke your macro labeled as a:
Usually I create a macro labeled as q, so I just type
q to stop recording and
@q to invoke it.
Note also that you can launch macro n times, for example to execute my macro ten times, I do
Split window and open another file:
Split window and open current directory:
Split window to a file relative to current open file. This will expand to current file:
:split % TAB.
To open a new tab you can do
:tabnew but it is more common to open a new tab moving the cursor on a file name and pressing
t (for example with NERDTree or Ack).
Go to next tab: