How do I quickly jump between function definitions or top-level blocks in a source file?
[[
The [[ and ]] commands navigate between top-level code blocks — specifically, lines where { appears in column 1.
189 results for ""+y"
[[
The [[ and ]] commands navigate between top-level code blocks — specifically, lines where { appears in column 1.
:/start/,/end/ {command}
Vim's range addressing lets you specify a line range using search patterns instead of explicit line numbers.
yss"
The yss{char} mapping from the vim-surround plugin surrounds the entire current line (ignoring leading whitespace) with the chosen delimiter.
:set tildeop
By default, ~ toggles the case of a single character and advances the cursor.
d/END/e<CR>
When you need to remove text up to a known marker, a plain search motion is often almost right but stops at the start of the match.
<C-r>={expr}<CR>
The expression register ("=) lets you evaluate any Vimscript expression and insert the result directly into the buffer — all without leaving insert mode.
:'<,'>copy'>
How it works The :copy command (or its abbreviation :t) duplicates lines to a specified destination.
:silent !{cmd}
Running :!cmd in Vim shows the command's output and then pauses with a "Press ENTER or type command to continue" prompt.
viw
How it works The command viw selects the word under the cursor in visual mode.
d2iw
Text objects in Vim accept a count, letting you operate on a span of multiple adjacent text objects in one command.
cs'"
The vim-surround plugin (by Tim Pope) adds three powerful operators for working with surrounding delimiters — quotes, brackets, parentheses, and HTML tags.
K
Pressing K in normal mode runs a lookup program on the word under the cursor.
navigation #navigation #help #documentation #normal-mode #keywordprg
v%
How it works The % motion jumps to the matching bracket, parenthesis, or brace.
has('nvim')
The has() function tests whether a feature or capability is available, returning 1 (true) or 0 (false).
!{motion}sort
The ! operator in Vim filters a motion's text through an external shell command, replacing it with the output.
"=
The expression register ("=) lets you evaluate any Vim expression and insert its result as text.
!{motion} {cmd}
The ! operator passes text selected by a motion through an external shell command, replacing it with the command's output.
$
The $ command moves the cursor to the last character of the current line.
:set operatorfunc=MyFunc<CR>g@
Vim lets you define custom operators that behave like built-in ones (d, c, y) — they wait for a motion or text object, then act on the selected region.
:'a,'b s/old/new/g
Marks can be used as range specifiers in any Ex command.
command-line #marks #command-line #ex-commands #ranges #editing