User Tools

Site Tools


vim:cheatsheet:working_with_multiple_files

VIM - Cheatsheet - Working with multiple files

    :e[dit] file - edit a file in a new buffer

    :ls or :buffers - list all open buffers

    :bn[ext] - go to the next buffer
    :bp[revious] - go to the previous buffer
    :b[uffer]# - go to a buffer by index #
    :b[uffer] file - go to a buffer by file

    :bd[elete] - delete a buffer (close a file)

    :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/working_with_multiple_files.txt · Last modified: 2021/02/16 10:51 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki