How do I enable the built-in matchit plugin to make % jump between matching HTML tags and keywords?
:packadd! matchit
Vim's % command jumps between matching brackets by default.
plugins #navigation #plugins #text-objects #matching #normal-mode
170 results for ":help"
:packadd! matchit
Vim's % command jumps between matching brackets by default.
plugins #navigation #plugins #text-objects #matching #normal-mode
[/
When editing code, you often need to navigate to the boundaries of multi-line block comments (/ .
:set nomodifiable
:set nomodifiable locks a buffer so that no changes can be made at all — not even temporary ones.
has('nvim')
The has() function tests whether a feature or capability is available, returning 1 (true) or 0 (false).
v (netrw)
When browsing files in Vim's built-in file manager (Netrw), pressing v on any file opens it in a vertical split to the right.
:e ++enc={encoding}
When Vim auto-detects the wrong character encoding — mojibake where é shows as é is a classic symptom — you can reload the current buffer with a specifi
/pattern1\&pattern2
Vim's \& operator lets you intersect two patterns so the match must satisfy both simultaneously.
:wincmd {key}
:wincmd is the Ex command equivalent of any keystroke.
:%s/pattern/\=MyFunc(submatch(0))/g
The \= prefix in Vim's substitute replacement invokes the expression register, which can call any Vimscript function.
:options
:options opens a special Vim buffer that lists every available option, grouped by category (appearance, editing, search, etc.
:let g:netrw_liststyle=3
Vim ships with a built-in file browser called netrw, opened with :Explore (or :Ex).
:set viewoptions-=options
When you use :mkview and :loadview, Vim stores more than folds and cursor position.
[#
Vim includes built-in motions for navigating C preprocessor conditional blocks: [# jumps backward to the previous unmatched #if or #else, and ]# jumps forward t
>%
Vim's > operator (indent) works with any motion or text object — including %, which jumps to the bracket, parenthesis, or brace matching the one under the cur
editing #editing #indentation #text-objects #normal-mode #motions
:set complete-=i
Vim's complete option controls which sources are scanned when you press or to complete a word.
:NERDTreeToggle
The NERDTree plugin provides a full-featured file explorer sidebar in Vim, giving you a visual directory tree that you can navigate, search, and manipulate file
:tjump
:tjump {identifier} is the smart tag-jumping command: it jumps directly when there is only one matching tag, but shows an interactive numbered list when multipl
has('feature')
The has('feature') function returns 1 if the specified feature is available in the current Vim/Neovim instance, 0 otherwise.
augroup name | autocmd! | autocmd ... | augroup END
Autocommand groups (augroup) with autocmd! prevent duplicate autocommands from accumulating every time you source your vimrc.
g8
Pressing g8 in normal mode displays the UTF-8 encoding of the character under the cursor as a sequence of hex bytes.