Practical Vim (6-21)
This blog written with Vim实用技巧(第2版).
Created at 2023/04/10
Skim the rest.
- The file is read into a buffer with the same name when we open a file in Vim;
- switch between different buffers,
:bnext:bprevor<C-^>; - for a hidden buffer, we can use
:wirteto save change or:edit!to dicard change; -
split windows:
Command Usage <C-w>shorizontal spliting <C-w>vvertical spliting :split {file}~ vsplit {file}~ <C-w>{w|h|j|k|l}move <C-w>cor:clo[se]close current <C-w>oor:on[ly]only preserve the current