How do I repeat the last substitute command quickly?
&
The & command in normal mode repeats the last :s substitution on the current line.
search #search #substitution #ex-commands #repeat #normal-mode
2277 results for "@a"
&
The & command in normal mode repeats the last :s substitution on the current line.
search #search #substitution #ex-commands #repeat #normal-mode
:checkpath!
:checkpath! recursively walks through every file reachable via Vim's include path and displays the full include tree.
vim.lsp.completion.enable()
Neovim 0.
'[ and ']
Vim automatically sets two special marks after every change, yank, or put operation: '[ and '].
it and at
Vim provides two built-in text objects for HTML and XML tags: it (inner tag) and at (a tag).
editing #text-objects #editing #visual-mode #html #normal-mode
:lcd %:p:h
:lcd %:p:h sets the working directory for the current window to the directory of the file you're editing, using Vim's path expansion modifiers.
Treesitter incremental selection with grn/grc
nvim-treesitter provides incremental selection that expands based on the syntax tree rather than simple text patterns.
zt / zb
The zt and zb commands scroll the viewport so the current cursor line appears at the top or bottom of the screen respectively, without moving the cursor.
:resize N / :vertical resize N
The :resize and :vertical resize commands set a window to an exact number of lines or columns.
:syntax on
The :syntax on command enables syntax highlighting in Vim, colorizing your code based on the file type.
z<CR>
While zt scrolls the current line to the top of the screen, z does the same scroll but also moves the cursor to the first non-blank character of that line.
V
The V (uppercase) command enters visual line mode, which selects the entire current line.
<C-w>c
The c (Ctrl+w then c) command closes the current window without closing the buffer it contains.
:set backupdir=~/.vim/backup// directory=~/.vim/swap//
How it works By default, Vim creates backup files (ending in ~) and swap files (ending in .
:profile
When Vim feels sluggish to start, the built-in :profile command lets you measure exactly how much time each script, function, or plugin takes to load.
gd / gr / <leader>rn with nvim-lspconfig
The Language Server Protocol (LSP) brings IDE-level intelligence to Neovim — go-to-definition, find references, rename symbol, and more.
:set relativenumber
The :set relativenumber command displays line numbers relative to the cursor position instead of absolute line numbers.