Continuing with Vim
These are the commands that I have started to adopt after having started with Vim . They are listed in the order that I started to adopt them.
March 2015
-
:set autoindent
maintain indentation on carriage return -
a
similar toi
though insert text after cursor -
5o<esc>
insert five blank lines below the current line -
5O<esc>
insert five blank lines above the current line- it's a capital O not a
-
5k
Go up five lines. -
20i<space><esc>
insert 20 spaces -
<ctrl>[
same as<esc>
only easier to reach -
"*p
paste from the Windows clipboard -
"*yy
copy to the Windows clipboard -
G
go to end of file -
gg
go to start of file -
:set list
show control characters except whitespace -
:set nolist
hide control characters -
:syntax on
+:set syntax=whitespace
show tabs & spaces -
zz
center the cursor vertically -
Shift+j
join two line (i.e. delete carriage return) -
Ctrl+o
execute normal command without leaving insert mode see also -
dd
to cut an entire line, thenp
orP
to paste it below/above -
:help substitute
view the help pages for find/replace
Notes