How do I visually select the text of a sentence without selecting surrounding whitespace?
vis
The is (inner sentence) text object selects the sentence the cursor is in — excluding any leading or trailing whitespace that separates sentences.
2277 results for "@a"
vis
The is (inner sentence) text object selects the sentence the cursor is in — excluding any leading or trailing whitespace that separates sentences.
:'<,'>normal {command}
After making a visual selection, :'normal {command} runs any normal-mode command on each selected line individually.
:let winid = win_getid() | ... | call win_gotoid(winid)
The wingetid() and wingotoid() functions let you bookmark a window by its stable integer ID and jump back to it reliably.
:s/\v(\S+)\s*=\s*(.*)/\=printf('%-20s = %s', submatch(1), submatch(2))/
When a line contains uneven key = value spacing, quick manual fixes are easy to get wrong.
:0put
The :put Ex command inserts register contents as a new line below the specified line number.
:lgrep /pattern/ % | lopen
Quickfix is global, but sometimes you want a narrower search workspace tied to one window.
<C-f> to scroll forward, <C-b> to scroll backward
How it works Vim provides two commands for scrolling by an entire screen (page) at a time: Ctrl-F (Forward) scrolls the view one full page down through the file
zr and zm
The zr and zm commands let you incrementally adjust the global fold depth across the entire buffer — one level at a time.
:.!sh
The :.
command-line #editing #ex-commands #shell #filtering #productivity
mzgUiw`z
When you run an operator like gUiw, Vim can leave your cursor in a slightly different place than where you started.
:let i=0 | g/pattern/s/pattern/\=printf('%d', i+=1)/
By combining :let, the :g global command, and an expression substitution with \=, you can replace every match of a pattern with a unique incrementing number.
>>
The >> command shifts the current line one shiftwidth to the right, adding indentation.
:execute
:execute evaluates a string as an Ex command, letting you build commands dynamically or embed special key sequences (like or ) as literal characters.
:Subvert/{src}/{tgt}/g
vim-abolish provides :Subvert, a smarter substitute that detects and preserves the case style of each match.
vim.system()
vim.
e
The e command moves the cursor to the last character of the current word.
map() and filter() with lambdas
Vim 8 introduced lambda expressions with the syntax {args -> expr}, enabling concise inline list transformations.
:ptjump /{pattern}
When a symbol name is ambiguous, jumping directly with :tag can bounce you around the codebase and disrupt your working context.
navigation #navigation #tags #windows #code-navigation #command-line
guiw
The guiw command converts the entire word under the cursor to lowercase.
:set scrolloff=5
The scrolloff option keeps a minimum number of lines visible above and below the cursor when scrolling.