How do I query databases directly from Vim without leaving my editor?
:DB
The vim-dadbod plugin by Tim Pope turns Vim into a powerful database client.
262 results for "visual mode"
:DB
The vim-dadbod plugin by Tim Pope turns Vim into a powerful database client.
V select then :norm A text
Selecting lines and running :norm A text appends the same text to the end of every selected line.
qaI<li><Esc>A</li><Esc>jq
This macro wraps each line in tags by inserting the opening tag at the start and appending the closing tag at the end.
ciw""<Esc>P
Vim doesn't have a built-in "surround" operator, but you can wrap any word in quotes or brackets with a short sequence: ciw""P.
editing #editing #text-objects #normal-mode #productivity #surround
`{mark}
The backtick command ` ` followed by a mark name jumps to the exact line and column of that mark, unlike the single-quote ' which only goes to the line.
:%s/old/new/g
The :%s/old/new/g command replaces all occurrences of old with new across every line in the file.
cx{motion}
The vim-exchange plugin by Tom McDonald provides the cx operator to swap two arbitrary text regions.
plugins #plugins #exchange #editing #text-objects #refactoring
d2i(
Vim text objects accept a count prefix that lets you target outer layers of nested delimiters.
guiw
The guiw command converts the entire word under the cursor to lowercase.
gUiw
The gUiw command converts the entire word under the cursor to uppercase.
J
The J command joins the current line with the line below it, replacing the newline with a space.
gJ
The gJ command joins the current line with the line below it without inserting any space between them.
( ) { } [[ ]]
Vim provides structural navigation motions that move by sentences, paragraphs, and sections.
O
The O (uppercase) command opens a new blank line above the current line and places you in insert mode, ready to type.
{count}{motion}
Almost every Vim motion and operator accepts a numeric count prefix that repeats or amplifies the action.
/pattern<CR>cgnreplacement<Esc>.
The gn text object selects the next search match, and cgn changes it.
:{range}normal {commands}
The :normal command executes normal mode keystrokes from the command line.
command-line #command-line #ex-commands #editing #normal-mode
{count}<C-a> / {count}<C-x>
While increments and decrements a number by 1, you can prefix either with a count to add or subtract a specific amount.
:&&
After running a :s/pattern/replacement/g command, you often need to repeat it on another line or range.
gg=G
The gg=G command re-indents every line in the current file according to Vim's indentation rules.