Useful features in Vim

1. resource

Why I love Vim: It’s the lesser-known features that make it so amazing
Vim 从入门到精通

2. tab-pages

open: :tabedit file
switch: gt, {n}gt
list: :tabs
close: :tabclose, :tabonly

3. session

:mksession header-files-work.vim
:mks!
vim -S header-files-work.vim

4. marks

{x} can be a-zA-Z0-9
mark: m{x}
copy: y'{x}
delete: d'{x}
fold: zf'{x}, use za to toggle
list all marks: :marks
go to marks: `{x}, '{x}

5. auto-complete

ctrl+n

6. macro

start record: q{x}
end record: q
repeat macro in x: @{x}
repeat last: @@

7. split window

:split file
:vsplit file
ctrl-w

Updated: