How do I convert between tabs and spaces in a visual selection?
:'<,'>retab!
The :retab! command converts between tabs and spaces based on your expandtab setting.
36 results for "gg=G"
:'<,'>retab!
The :retab! command converts between tabs and spaces based on your expandtab setting.
:keepjumps
When writing scripts or running commands that move the cursor (like :g, :s, or :normal), Vim normally adds each cursor position to the jump list.
winrestcmd()
The winrestcmd() function returns a string of Ex commands that, when executed, restore all window sizes to their state at the time of the call.
=i{ or =ap
The = operator performs smart indentation based on Vim's filetype-aware indent rules.
:reg {names}
The :registers command dumps every register at once, which is noisy when you only care about a handful.
vip=
Pressing = in visual mode re-indents all selected lines according to the current filetype's indent rules — the same engine used by == for a single line, but a
visual-mode #visual-mode #indentation #editing #text-objects
42G
The 42G command jumps the cursor directly to line 42 in the current file.
:execute
:execute evaluates a string as an Ex command, letting you build commands dynamically or embed special key sequences (like or ) as literal characters.
:bufdo {cmd}
:bufdo executes an Ex command in each open buffer in sequence, cycling through every buffer in the buffer list.
= (in visual mode)
After making a visual selection, pressing = applies Vim's auto-indent to every selected line at once.
<C-i>
Every time you make a "jump" — using G, /, %, :tag, , or similar commands — Vim records your position in the jump list.
<C-v>jj$A text<Esc>
Visual block mode combined with $A lets you append text to the end of multiple lines simultaneously, even when those lines have different lengths.
visual-mode #editing #visual-mode #block-mode #productivity #insert-mode
<C-o>
The (Ctrl+o) command jumps the cursor backward through the jump list, returning you to previous cursor positions.
:{range} normal @{reg}
The :normal command lets you execute Normal mode keystrokes over a range of lines.
gi
The gi command moves the cursor to the position where you last exited insert mode and immediately enters insert mode again.
navigation #navigation #insert-mode #marks #normal-mode #productivity
{N}%
The {N}% command jumps the cursor to the line that is N percent of the way through the file.