How do I move the cursor to the top of the visible screen?
H
The H command moves the cursor to the first line of the currently visible screen (the "High" position).
1024 results for "i" a""
H
The H command moves the cursor to the first line of the currently visible screen (the "High" position).
:bprev
The :bprev (or :bp for short) command switches to the previous buffer in Vim's buffer list.
=
Pressing = in visual mode auto-indents the selected lines according to Vim's built-in indentation rules.
visual-mode #editing #visual-mode #indentation #formatting #productivity
:cwindow
The :cwindow command intelligently manages the quickfix window — it opens the window only if there are entries in the quickfix list, and closes it if the list
:/start/,/end/d
Instead of specifying line numbers for Ex command ranges, you can use search patterns.
command-line #ex-commands #editing #search #ranges #command-line
:profile start /tmp/profile.log | profile func *
When Vim feels sluggish during editing (not just at startup), the :profile command lets you measure the execution time of every function call.
ci" / ci( / ci{ / ci[ / ci` / ci'
The ci{delimiter} family of commands changes the text inside any matching pair of delimiters.
editing #editing #text-objects #change #delimiters #normal-mode
<C-k>
Vim has a built-in digraph system that lets you type special characters using short two-character codes.
&
The & command in normal mode repeats the last :s substitution on the current line.
search #search #substitution #ex-commands #repeat #normal-mode
<C-g> and <C-t>
While the search prompt is open (with incsearch enabled), pressing advances the cursor to the next match and moves it to the previous match — all without leav
gD
How it works Vim provides two built-in commands for jumping to where an identifier is defined, without needing tags or an LSP: gd (lowercase) searches backward
:set splitbelow splitright
How it works By default, Vim opens horizontal splits (:split or :sp) above the current window and vertical splits (:vsplit or :vsp) to the left.
:.+1,.+3d
Vim's Ex command addresses support arithmetic offsets relative to the current line (.
command-line #ex-commands #editing #navigation #command-line
gp
The standard p command pastes text after the cursor but leaves the cursor at the beginning of the pasted text.
:profile start profile.log
When Vim feels sluggish, the built-in :profile command lets you measure exactly how much time each script and function consumes.
:vimgrep /pattern/ **
:vimgrep /pattern/ searches recursively through all files in the current working directory tree using Vim's own regex engine, populating the quickfix list with
:'<,'>!awk '{print toupper($0)}'
Vim can pipe any visual selection through external Unix commands and replace the selection with the output.
visual-mode #visual-mode #external-command #awk #text-transformation
ysiw<em>
The vim-surround plugin makes wrapping text in HTML or XML tags effortless.
* then :%s//new/g
Pressing searches for the word under the cursor, which also loads it into the search register.
:args **/*.py | argdo %s/old/new/gc | update
Vim can perform search-and-replace across multiple files without any plugins by combining the arglist with :argdo.
search #search #substitution #ex-commands #productivity #quickfix #arglist