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.
261 results for "visual mode"
va"
Vim's text objects let you select structured regions of text with two-keystroke shortcuts.
<C-\><C-n>
While works to leave insert or visual mode, it does not work in every situation — particularly in terminal mode (:terminal), where is consumed by the running
qa I1. <Esc>j q
This simple macro inserts a list number prefix at the beginning of each line.
vi"
The vi" command visually selects all text inside double quotes, without including the quotes themselves.
visual-mode #visual-mode #text-objects #editing #normal-mode
gcc to toggle line
Comment.
gl{motion}{char}
vim-lion (by Tom McDonald) adds gl and gL as alignment operators.
c""<Esc>P
Without a surround plugin, you can manually wrap selected text by changing it, typing the delimiters, and pasting the original text back.
vip
The vip command visually selects the inner paragraph — all contiguous non-blank lines surrounding the cursor.
visual-mode #visual-mode #text-objects #editing #normal-mode
<C-v>jjc replacement<Esc>
Visual block mode's change command lets you replace a rectangular column of text across multiple lines in a single operation.
visual-mode #editing #visual-mode #block-mode #normal-mode #productivity
<C-v>jjjg<C-a>
Selecting a column of identical numbers with visual block mode and pressing g turns them into an incrementing sequence.
:{range}command
Every Ex command in Vim can be preceded by a range that specifies which lines it should operate on.
command-line #command-line #ex-commands #ranges #editing #productivity
gaip=
vim-easy-align is a plugin by Junegunn Choi that makes aligning text around delimiters effortless.
>>
The >> command shifts the current line one shiftwidth to the right, adding indentation.
grn / grc / grm
Neovim's nvim-treesitter plugin provides incremental selection based on the abstract syntax tree (AST) of your code.
:DB sqlite:mydb.sqlite SELECT * FROM users
vim-dadbod by Tim Pope is a plugin that lets you interact with databases directly from Vim.
ysiw)
The vim-surround plugin provides the ys (you surround) operator to wrap any Vim text object or motion with a delimiter pair.
plugins #plugins #surround #editing #text-objects #normal-mode
d<C-v>2j
Vim lets you override the natural type of any motion by pressing v, V, or between the operator and the motion.
editing #editing #motions #visual-mode #advanced #normal-mode
vas
The vas command visually selects the current sentence, including surrounding whitespace.
gj
The gj command moves the cursor down by one display line rather than one physical line.
:set foldmethod=marker
Setting foldmethod=marker lets you define fold boundaries using special comment markers — {{{ to start a fold and }}} to end it.