How do I jump to the beginning of a file in Vim?
gg
The gg command moves the cursor to the first line of the file.
262 results for "visual mode"
gg
The gg command moves the cursor to the first line of the file.
:Gitsigns preview_hunk
gitsigns.
80i-<Esc>
Vim's insert commands accept a count prefix that repeats everything you type.
I
The I (uppercase) command moves the cursor to the first non-blank character of the current line and enters insert mode.
!{motion}{program}
The ! operator in normal mode lets you pipe a range of text through any external program and replace it with the output.
yyp
The yyp command duplicates the current line by yanking it and immediately pasting it below.
:s/\d\+/\=submatch(0)+1/g
The \= prefix in a :substitute replacement field tells Vim to evaluate the following as a Vimscript expression rather than treating it as a literal string.
% with matchit plugin
The % command jumps between matching brackets by default, but with the built-in matchit plugin, it extends to match language-specific keywords like if/else/endi
A
The A command moves the cursor to the end of the current line and enters insert mode.
gj / gk
When a long line wraps across multiple screen rows, the regular j and k motions skip the entire logical line.
{N}|
The command (pipe character) moves the cursor to a specific column number on the current line.
"/
Vim stores the last search pattern in the special / register.
crs / crm / crc / cru
Tim Pope's vim-abolish plugin provides cr (coerce) commands that instantly convert the word under the cursor between common naming conventions.
guu / gUU
Vim's case operators gu (lowercase) and gU (uppercase) follow the same doubling convention as dd and yy: repeating the operator letter applies it to the whole c
K
Pressing K in normal mode runs a lookup program on the word under the cursor.
navigation #navigation #help #documentation #normal-mode #keywordprg
:set nrformats+=hex,bin
By default, Vim's and only increment and decrement decimal numbers.
:.!{cmd}
:.
=i{ or =ap
The = operator performs smart indentation based on Vim's filetype-aware indent rules.
$
The $ command moves the cursor to the last character of the current line.
:%norm! A;
The :norm! (or :normal!) command executes normal mode keystrokes while ignoring all user-defined mappings.