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
1044 results for "i" a""
: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
:'<,'>s/pattern/replacement/g
When you make a visual selection and then type :, Vim automatically inserts ' as the range — the marks for the start and end of the last visual selection.
dp / do
When reviewing differences between files in Vim's built-in diff mode, dp and do let you selectively apply individual hunks without leaving the editor.
:<line-number>
When you know the exact line number you want to navigate to, the colon command is the quickest way to get there.
:w !{cmd}
The :w !{cmd} command writes the buffer contents to the stdin of an external shell command without modifying the buffer or saving to disk.
command-line #command-line #ex-commands #shell #editing #productivity
:t {address}
How it works The :t command (short for :copy) copies one or more lines and places them below the specified address.
:g/pattern/t$
How it works The :g (global) command combined with :t (copy) lets you duplicate all lines matching a pattern to a specific location.
:%!
The ! operator pipes text through a shell command, replacing the selected lines with the command's output.
:%s/\(\w\+\) \(\w\+\)/\2 \1/g
Vim's substitute command supports captured groups (back-references) using \( and \), allowing you to capture parts of a match and rearrange them in the replacem
?pattern
The ?pattern command searches backward through the file for the given pattern, starting from the cursor position and wrapping around to the end of the file if n
:set updatetime=250
The updatetime option controls how long Vim waits after you stop typing before triggering certain events (like swap file writes and CursorHold autocommands).
"=expression<CR>p
The expression register ("=) lets you evaluate any Vimscript expression and paste the result directly into your buffer from normal mode.
registers #registers #editing #normal-mode #productivity #math
gcc
The vim-commentary plugin by Tim Pope provides a minimal yet powerful way to toggle comments in any programming language.
plugins #plugins #commentary #commenting #editing #normal-mode
42G
The 42G command jumps the cursor directly to line 42 in the current file.
:'<,'>g/pattern/command
How it works The :g (global) command is one of Vim's most powerful features.
[[
The [[ and ]] commands navigate between top-level code blocks — specifically, lines where { appears in column 1.
:find filename
The :find command searches for a file by name across all directories in your path setting and opens it.
buffers-windows #buffers #file-management #navigation #workflow
:cexpr system('grep -rn TODO .')
The :cexpr command evaluates an expression and parses the result as quickfix entries using the current errorformat.
ge
The ge motion moves the cursor backward to the end of the previous word.
:%s/pattern//gn
The :%s/pattern//gn command counts how many times a pattern appears in the file without making any changes.