How do I change the case of selected text in visual mode?
U, u, or ~ in visual mode
How it works When you have text selected in visual mode, you can change its case with three simple keys: U - Convert the entire selection to UPPERCASE u - Conve
U, u, or ~ in visual mode
How it works When you have text selected in visual mode, you can change its case with three simple keys: U - Convert the entire selection to UPPERCASE u - Conve
> and <
How it works In visual mode, you can shift selected lines to the right or left using the > and to indent them or or shifts the selected lines one shiftwidth to
gaip=
vim-easy-align is a plugin by Junegunn Choi that makes aligning text around delimiters effortless.
:set statusline=%f\ %y\ [%l/%L]
Vim's statusline option lets you build a custom status bar from format items.
=i{ or =ap
The = operator performs smart indentation based on Vim's filetype-aware indent rules.
:%!python3 -m json.tool
The :%! command pipes the entire buffer through an external command and replaces it with the output.
command-line #command-line #shell #formatting #json #workflow
:%!column -t
The column -t command formats whitespace-separated text into neatly aligned columns.
command-line #command-line #shell #formatting #text-manipulation
gS / gJ
The splitjoin.
plugins #plugins #splitjoin #editing #refactoring #formatting
<Leader>tm
The vim-table-mode plugin by Dhruva Sagar turns Vim into a powerful table editor that automatically formats and aligns table columns as you type.
:ALEToggle
The ALE (Asynchronous Lint Engine) plugin provides real-time linting and automatic fixing for dozens of languages without blocking your editor.
vim: set ts=2 sw=2 :
A modeline is a special comment embedded in a file that Vim reads to apply file-specific settings automatically.
=
Pressing = in visual mode auto-indents the selected lines according to Vim's built-in indentation rules.
visual-mode #editing #visual-mode #indentation #formatting #productivity
~
The ~ command toggles the case of the character under the cursor — uppercase becomes lowercase and vice versa — then advances the cursor one position to the
gUiw
The gUiw command converts the entire word under the cursor to uppercase.
:set colorcolumn=80
The :set colorcolumn=80 command displays a vertical highlight at column 80, giving you a visual guide for line length.
:'<,'>sort
The :'sort command sorts the currently selected lines in visual mode alphabetically.
gqip
The gqip command reformats the current paragraph to fit within the configured textwidth.
>>
The >> command shifts the current line one shiftwidth to the right, adding indentation.
J
The J command joins the current line with the line below it, replacing the newline with a space.
:g/^$/d
The :g/^$/d command deletes every blank line in the file using Vim's powerful global command.