How do I extend a visual selection to a search match?
v/pattern<CR>
Starting a search while in visual mode extends the selection to the search match.
181 results for "n N"
v/pattern<CR>
Starting a search while in visual mode extends the selection to the search match.
qq;.q then @q or @@
The dot command (.
:set complete+=kspell
Vim's built-in completion ( / ) sources matches from buffers, included files, and tags by default.
:Telescope find_files
Telescope is a highly extensible fuzzy finder for Neovim.
Harpoon: mark files and jump with <leader>1-4
Harpoon by ThePrimeagen provides instant access to a curated list of files you're actively working on.
vim.lsp.buf.definition()
Neovim has a built-in LSP (Language Server Protocol) client that provides IDE-like features without plugins.
/pattern/e
Search offsets let you place the cursor at a specific position relative to the match.
:keeppattern s/old/new/g
When you run a :s or :g command, Vim updates the search register (@/) with the pattern you used.
G
The G command moves the cursor to the last line of the file.
:keeppatterns {command}
The :keeppatterns modifier runs an Ex command — typically :s, :g, or :v — without modifying @/ (the last search pattern) or the command history.
command-line #ex-commands #search #substitution #command-line #scripting
<C-w>+
When working with multiple split windows, you often need to resize them to see more content in one pane.
:%s/pattern//gn
The :%s/pattern//gn command counts how many times a pattern appears in the file without making any changes.
:'<,'>!awk '{printf "%-20s %s\n", $1, $2}'
By piping a visual selection through awk with printf formatting, you can align columns to fixed widths.
visual-mode #visual-mode #formatting #alignment #external-command
:.+1,.+3d
Vim's Ex command addresses support arithmetic offsets relative to the current line (.
command-line #ex-commands #editing #navigation #command-line
:terminal
The :terminal command opens an interactive terminal emulator directly inside a Vim window.
gn
The gn motion searches forward for the next match of the last search pattern and visually selects it.
search #navigation #search #motions #normal-mode #repeat #editing
*
The command searches forward for the exact word under the cursor, jumping to the next occurrence.
:ls
The :ls command displays a list of all open buffers in Vim, showing their buffer number, status indicators, file name, and the line the cursor was last on.
* (in visual mode)
In normal mode, searches for the word under the cursor with word-boundary anchors.
/pattern<CR>cgnreplacement<Esc>.
The gn text object selects the next search match, and cgn changes it.