Skip to content

Instantly share code, notes, and snippets.

@patocallaghan
Last active September 19, 2023 10:10
Show Gist options
  • Save patocallaghan/6066220 to your computer and use it in GitHub Desktop.
Save patocallaghan/6066220 to your computer and use it in GitHub Desktop.
A collection of useful VIM commands I always have trouble remembering..
#Check system version information
:version
#Check what plugins are installed
:scriptnames
#Open .vimrc
<leader> + e,v
#Reload .vimrc
:so %
#Open multiple files in buffer
:args *.html
#Search and replace across multiple files
:bufdo %s/pattern/replace/ge | update
#Wipeout multiple buffers
:1,50bw
#Delete multiple buffers
:1,50bd
#Collapse/Expand HTML Tags
zfat or zfit - to fold a tag
za - to toggle tag
zR - opens all folds in current document
#Invalid NERDTree Bookmarks
Edit `~/.NERDTreeBookmarks`
@Piliponful
Copy link

I don't understand, WHAT IS zfit??

@Klrfl
Copy link

Klrfl commented Sep 19, 2023

zfat (or zfit) is useful when you want to fold an HTML tag. In VS Code, you would do this via the arrow at the right of the line number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment