vim:cheatsheet
This is an old revision of the document!
VIM - Cheatsheet
Insert mode - inserting/appending text
Working with multiple files
:e[dit] file - edit a file in a new buffer :bn[ext] - go to the next buffer :bp[revious] - go to the previous buffer :bd[elete] - delete a buffer (close a file) :b[uffer]# - go to a buffer by index # :b[uffer] file - go to a buffer by file :ls or :buffers - list all open buffers :sp[lit] file - open a file in a new buffer and split window :vs[plit] file - open a file in a new buffer and vertically split window :vert[ical] ba[ll] - edit all buffers as vertical windows :tab ba[ll] - edit all buffers as tabs Ctrl + ws - split window Ctrl + wv - split window vertically Ctrl + ww - switch windows Ctrl + wq - quit a window Ctrl + wx - exchange current window with next one Ctrl + w= - make all windows equal height & width Ctrl + wh - move cursor to the left window (vertical split) Ctrl + wl - move cursor to the right window (vertical split) Ctrl + wj - move cursor to the window below (horizontal split) Ctrl + wk - move cursor to the window above (horizontal split)
vim/cheatsheet.1613472449.txt.gz · Last modified: 2021/02/16 10:47 by peter