How do I run a Lua expression on every line of a buffer in Neovim?
:[range]luado {lua-expr}
Neovim's :luado command runs a Lua expression on each line of a range, allowing you to transform text using the full power of Lua's string library.
432 results for "visual mode"
:[range]luado {lua-expr}
Neovim's :luado command runs a Lua expression on each line of a range, allowing you to transform text using the full power of Lua's string library.
: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.
"0p
Register 0 (the yank register) always contains the text from your most recent yank command — and unlike the unnamed register, it is never overwritten by delet
:set diffopt+=algorithm:histogram,indent-heuristic
Default diff behavior can produce noisy hunks when code is moved or indentation changes significantly.
: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.
5:
Typing a count before : in normal mode automatically fills in a line range in the command line.
command-line #command-line #ex-commands #ranges #normal-mode
>%
Vim's > operator (indent) works with any motion or text object — including %, which jumps to the bracket, parenthesis, or brace matching the one under the cur
editing #editing #indentation #text-objects #normal-mode #motions
:t.
The :t (short for :copy) command copies lines from one location to another.
:let @/ = "pattern"
Assigning a string directly to the search register @/ with :let causes Vim to highlight all matches (if hlsearch is enabled) without performing a search or movi
[{ / ]}
When editing code inside a deeply nested block, [{ jumps backward to the unmatched { that encloses the current position, and ]} jumps forward to its matching }.
!{motion}command
The ! operator in normal mode pipes text through an external shell command and replaces it with the output.
gU{motion} / gu{motion} / g~{motion}
Vim has three case operators that work with any motion or text object: gU for uppercase, gu for lowercase, and g~ for toggle case.
editing #editing #case #operators #text-objects #normal-mode
gm
The gm command moves the cursor horizontally to the middle of the current screen width on the current line.
ysiwf
vim-surround's f and F surrounds let you wrap any text object inside a function call, prompting you for the function name.
ysiw"
The ysiw" command wraps the word under the cursor in double quotes using the vim-surround plugin.
cs"(
The cs operator in vim-surround (change surrounding) swaps one pair of delimiters for another without touching the content inside.