How do I visually select a double-quoted string including the quotes themselves?
va"
Vim's text objects let you select structured regions of text with two-keystroke shortcuts.
va"
Vim's text objects let you select structured regions of text with two-keystroke shortcuts.
:ALEFix
ALE (Asynchronous Lint Engine) is a popular Vim plugin that runs linters and formatters asynchronously in the background, showing errors and warnings in the gut
autocmd FileType python setlocal expandtab shiftwidth=4
Vim's autocmd FileType lets you apply settings automatically whenever a specific file type is detected.
r<CR>
You can split a line at the cursor without entering Insert mode by using r.
gM
The gM command moves the cursor to the horizontal middle of the current line, regardless of how long the line is.
:%normal @q
To apply a macro to every line in the file, use :%normal @q.
:cnext
The quickfix list is Vim's built-in way to collect a list of positions — typically compiler errors, grep results, or linter warnings — and jump between them
<C-r>:
Vim stores your last executed Ex command in the read-only : register.
//
In Vim, pressing // (two forward slashes) in Normal mode repeats the last search pattern.
:saveas
The :saveas {filename} command writes the current buffer to a new file and makes that new file the current buffer's file.
vas
The vas command visually selects the current sentence, including surrounding whitespace.
cr
The vim-abolish plugin (by tpope) provides a cr (coerce) operator that converts the word under the cursor between naming conventions with a single keystroke pai
:options
:options opens a special Vim buffer that lists every available option, grouped by category (appearance, editing, search, etc.
:'<,'>norm @q
When you visually select lines and then type a : command, Vim automatically inserts ' (the visual range marks) into the command line.
<C-v>I#<Esc>
Vim's Visual Block mode lets you prepend characters (like comment markers) to multiple lines simultaneously.
<C-t> / <C-d>
While in Insert mode, you can adjust indentation without switching back to Normal mode.
cs'"
The vim-surround plugin (by Tim Pope) adds three powerful operators for working with surrounding delimiters — quotes, brackets, parentheses, and HTML tags.
:set exrc
Vim's exrc option tells Vim to look for a .
:tabedit
Vim's tab pages let you keep separate window layouts open at the same time, each with its own set of splits.
"qp
Macros are stored as plain text in named registers.