You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:pwd # List current Directory
:cd ${/some/dir} # Change to some dir
:e ${/some/file} # Edit some file
:term # Open a terminal
Buffer Management
Handy Buffer Commands
:b${#} # switch buffer to desired buffer number
:ls # list all buffers
:vs # Vertical Split: Split the buffer vertically
:vs ${/file/name} # Vertical Split and open a file into the buffer
:bs${#} # Horizontal split existing buffer number to new buffer
Ctrl + ww # Switch between buffers in view. Instead of the last `w` you can also use an arrow key to direct to which buffer to switch to.
Buffer Deletion
:bd # deletes the current buffer, error if there are unwritten changes
:bd! # deletes the current buffer, no error if unwritten changes
:bufdo bd # deletes all buffers, stops at first error (unwritten changes)
:bufdo! bd # deletes all buffers except those with unwritten changes
:bufdo! bd! # deletes all buffers, no error on any unwritten changes
Less Safe Buffer Deletion
:bw # completely deletes the current buffer, error if there are unwritten changes
:bw! # completely deletes the current buffer, no error if unwritten changes
:bufdo bw # completely deletes all buffers, stops at first error (unwritten changes)
:bufdo! bw # completely deletes all buffers except those with unwritten changes
:bufdo! bw! # completely deletes all buffers, no error on any unwritten changes
:set confirm # confirm changes (Yes, No, Cancel) instead of error
NerdTree
ctrl + e # Open Nerdtree (specific to spf13 vim)
t # Open new NerdTree buffer to slected folder
CC # Change NerdTree root directory to the currently selected directory