How do I go back to a specific point in time using Vim's undo history?
:earlier 5m
Vim's :earlier and :later commands let you travel through your undo history using time-based offsets — not just individual changes.
233 results for "10@a"
:earlier 5m
Vim's :earlier and :later commands let you travel through your undo history using time-based offsets — not just individual changes.
:resize N / :vertical resize N
The :resize and :vertical resize commands set a window to an exact number of lines or columns.
g<C-x>
Most people know decrements one number under the cursor, but g in Visual mode performs a sequential decrement across the selection.
:set winwidth=85 winheight=20
Setting winwidth and winheight tells Vim the minimum column width and line height the current focused window must have.
:{range}!command
The :{range}!command syntax pipes the specified lines through an external shell command and replaces them with the output.
command-line #command-line #shell #filtering #unix #ex-commands
qa<C-a>jq
By recording a one-step macro that increments a number and moves down a line, you can bulk-apply across as many lines as needed with a single count.
/\%5l\%10cpattern
Vim provides position-matching atoms that constrain where a pattern can match based on line numbers, column positions, or virtual columns.
v_o
When you start a visual selection, the cursor is at one end and the anchor is at the other.
:sort! n
The :sort! n command sorts the lines of a buffer (or a range) by their numeric value in descending order.
<C-w>+ / <C-w>- / <C-w>> / <C-w><
Vim provides keyboard shortcuts to resize split windows without reaching for the mouse.
:set winfixheight
When you have a specific window you want to keep at a fixed size — like a terminal, log viewer, or reference file — winfixheight and winfixwidth prevent Vim
qa Yp <C-a> q
By combining a macro with (increment number), you can quickly generate numbered sequences.
<C-w>> and <C-w><
The > and > increases width by 1 column > increases width by 10 columns maximizes the window width Example With a vertical split, 20> gives the current window 2
:%sort u
The :sort u command sorts all lines in the file and removes duplicate lines in one operation.
command-line #command-line #ex-commands #editing #text-manipulation #sort
<C-w>d
Neovim 0.
buffers-windows #diagnostics #lsp #floating-window #neovim #buffers #windows
vim.system({cmd}, {opts}, callback)
vim.
\%l and \%c
Vim's \%l and \%c pattern atoms anchor a search to a particular line number or column, enabling surgical searches and substitutions that standard regex cannot e
:'<,'>normal A;
The :normal command executes normal-mode keystrokes on every line in a range.
command-line #command-line #ex-commands #editing #normal-mode #batch-editing
<C-a>
The command increments the number under or after the cursor by 1.
{count}%
When used with a count, the % command jumps to the line at that percentage of the file.