How do I use tab pages in Vim to organize multiple files?
:tabnew / gt / gT
Vim's tab pages let you organize your workspace into separate views, each containing its own window layout.
buffers-windows #buffers #windows #tabs #navigation #productivity
415 results for "n N"
:tabnew / gt / gT
Vim's tab pages let you organize your workspace into separate views, each containing its own window layout.
buffers-windows #buffers #windows #tabs #navigation #productivity
:echo @/
The / register holds the most recent search pattern.
:keeppatterns %s/\s\+$//e
Bulk cleanup commands often damage your navigation flow by overwriting the last search pattern (@/).
command-line #command-line #search #substitution #whitespace
g*
The g command searches forward for the text under the cursor without adding word boundary anchors.
search #search #navigation #normal-mode #motions #productivity
<C-k>{two-chars}
Vim's digraph system lets you type hundreds of special characters — arrows, fractions, accented letters, currency symbols, and more — using intuitive two-ch
crs
The vim-abolish plugin by Tim Pope provides instant case coercion commands that convert the word under your cursor between common naming conventions.
/\%>80v\S
When you enforce line-length limits, visual guides show where the boundary is, but they do not help you jump directly to violations.
:nohlsearch
After a search in Vim, matched text is highlighted as long as hlsearch is enabled.
:pop or <C-t>
When you jump to a tag definition with , Vim pushes your location onto a tag stack.
set foldmarker=start,end
When using foldmethod=marker, Vim uses {{{ and }}} as the default fold open and close markers.
:s/\(\w\+\) \(\w\+\)/\=submatch(2) . ' ' . submatch(1)/
The submatch(N) function lets you access individual capture groups inside a \= (expression replacement) in a substitution.
*Ndgn
When you are reviewing repetitive text, you often need to remove one specific match without running a broad substitute.
/\V<C-r>=histget('/', -2)<CR>
If you often alternate between two complex search patterns, opening q/ each time is slow.
/\S\zs\s\+$
A plain trailing-whitespace search like /\s\+$ also matches fully blank lines, which is noisy when you only want accidental spaces after real content.
:setlocal winfixheight winfixwidth
If you use a dedicated utility pane (logs, quick notes, REPL output), Vim's default equalization behavior can keep resizing it whenever other splits change.
.
The .
:[range]sort /regex/
The :[range]sort /regex/ command sorts lines while skipping the portion of each line that matches the regex.
:set wrapscan!
wrapscan controls what happens when a / or ? search reaches the end (or beginning) of the file.
/\%>20l\%<40lTODO
Vim's search engine can constrain matches by line number, which is useful when you want to scan a known section without touching the rest of the buffer.
set sidescrolloff
set sidescrolloff={n} keeps at least n columns of context to the left and right of the cursor when long lines cause the view to scroll horizontally.