How do I toggle the display of hidden dot-files in Vim's built-in netrw file browser?
gh (in netrw)
When browsing files with Vim's built-in netrw file explorer (:Explore or :Ex), hidden files starting with a dot (.
Search Vim Tricks
Searching...gh (in netrw)
When browsing files with Vim's built-in netrw file explorer (:Explore or :Ex), hidden files starting with a dot (.
:'<,'>center / :'<,'>right / :'<,'>left
Vim has built-in Ex commands to align text within a specified width: :center, :right, and :left.
/pattern1\&pattern2
Vim's \& operator lets you intersect two patterns so the match must satisfy both simultaneously.
crs / crc / crm / cru
The vim-abolish plugin adds coercion operators that instantly convert the word under the cursor between common naming conventions.
plugins #editing #text-objects #plugins #normal-mode #formatting
:tabdo
The :tabdo {cmd} command executes an Ex command in each open tab page sequentially, visiting every tab and running the command there.
buffers-windows #tabs #buffers #ex-commands #buffers-windows
zi
Pressing zi in normal mode toggles the foldenable option, which controls whether folds are active in the current window.
\{-}
In Vim's regex engine, \{-} is the non-greedy (lazy) quantifier — it matches as few characters as possible, unlike .
g8
Pressing g8 in normal mode displays the UTF-8 encoding of the character under the cursor as a sequence of hex bytes.
:sort r /\w\+$/
The :sort r /{pattern}/ command sorts lines using the text that matches the pattern as the sort key.
:set completeopt=menuone,noselect
By default, Vim's and completion can auto-insert the first match, or only show a menu when there are multiple matches.
:call setreg('q', 'dd')
The setreg() VimScript function lets you populate any register with arbitrary content directly from the command line or a script — no recording required.
/prefix\zsword
Vim's \zs atom marks the start of the match within a longer pattern.
das
Vim defines a sentence as text ending with .
editing #editing #text-objects #delete #normal-mode #motions
:set nrformats+=hex
By adding hex to the nrformats option, you tell Vim to recognise hexadecimal literals such as 0xFF or 0xDEAD when or is pressed.
zp
Pastes a blockwise register like p, but skips padding lines shorter than the block's right edge with trailing spaces.
:InspectTree
Opens an interactive split window showing the treesitter parse tree for the current buffer.
:set diffopt+=algorithm:histogram
Switches Vim's diff algorithm from the default Myers algorithm to histogram, which produces more semantically meaningful diffs by avoiding false matches between
:set splitkeep=screen
Controls how Neovim preserves the visual position of content when creating, closing, or resizing horizontal splits.
:set wildoptions=fuzzy
Enables fuzzy matching for Neovim's command-line tab completion (wildmenu), so you can match any part of a filename, command, or option — not just from the be
command-line #completion #command-line #neovim #config #wildmenu
:set formatoptions-=cro
By default, Vim continues the current comment leader when you press in insert mode or open a new line with o/O.