Last active
September 19, 2023 10:10
-
-
Save patocallaghan/6066220 to your computer and use it in GitHub Desktop.
A collection of useful VIM commands I always have trouble remembering..
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
zfat
(orzfit
) 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.