How do I make Vim highlight matching brackets when typing?
:set showmatch
How it works The :set showmatch option makes Vim briefly jump the cursor to the matching opening bracket when you type a closing bracket.
261 results for "visual mode"
:set showmatch
How it works The :set showmatch option makes Vim briefly jump the cursor to the matching opening bracket when you type a closing bracket.
X
The X command deletes the character to the left of the cursor (before it).
:'<,'>!sort -t',' -k2 -n
Vim does not have a built-in multi-column sort, but you can leverage the external sort command to sort selected lines by any field.
editing #editing #sorting #ex-commands #external-commands #command-line
onoremap ih :<C-u>execute "normal! ?^==\+$\r:noh\rkvg_"<CR>
Vim lets you define custom text objects using operator-pending mode mappings (onoremap) and visual mode mappings (vnoremap).
:let i=1 then use <C-r>=i<CR> in macro
By combining a Vimscript variable with the expression register inside a macro, you can create a counter that increments on each replay.
==
The == command auto-indents the current line based on the surrounding context.
cs"' (change), ds" (delete), ys iw" (add)
The vim-surround plugin by Tim Pope adds commands for working with surrounding characters like quotes, brackets, and tags.
ddp
The ddp sequence swaps the current line with the line below it.
dip
The dip command deletes the inner paragraph — all contiguous non-blank lines surrounding the cursor.
<C-a>
The command increments the number under or after the cursor by 1.
:help topic
Vim has an extensive built-in help system.
gcc (toggle line), gc{motion} (toggle range)
vim-commentary by Tim Pope provides a simple way to toggle comments.
Plug 'vim-airline/vim-airline'
vim-airline provides a beautiful, feature-rich status line that shows file info, git branch, diagnostics, and more with minimal configuration.
L
The L command moves the cursor to the last line visible in the current window.
:nnoremap key command
The :nnoremap command creates a non-recursive normal mode mapping.
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
qaI// <Esc>jq
This macro adds a // comment prefix to the beginning of the current line and moves down.
}
The } motion moves the cursor forward to the next blank line, effectively jumping to the next paragraph.
:%normal command
The :normal command executes normal mode commands programmatically on a range of lines.
:DB
The vim-dadbod plugin by Tim Pope turns Vim into a powerful database client.