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
2125 results for "i" a""
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
:t.
The :t (short for :copy) command copies lines from one location to another.
nzz
Typing nzz chains two normal-mode commands: n jumps to the next match of the last search, and zz immediately redraws the screen so the cursor line is vertically
:drop {file}
When the same file is already open elsewhere, using :edit can create extra navigation friction because you stay in the current window and may lose layout contex
buffers-windows #buffers-windows #windows #buffers #workflow
"+y
The "+y command yanks (copies) text into the system clipboard register, making it available to paste in other applications outside of Vim.
:set tabstop=4 shiftwidth=4 expandtab
The :set tabstop=4 shiftwidth=4 expandtab command configures Vim to use 4-space indentation with spaces instead of tab characters.
:syntime on
When Vim feels sluggish while editing files with complex syntax highlighting, :syntime lets you profile exactly which syntax rules are consuming the most time.
C
The C command deletes everything from the cursor position to the end of the line and places you in insert mode.
gU{motion} / gu{motion} / g~{motion}
Vim has three case operators that work with any motion or text object: gU for uppercase, gu for lowercase, and g~ for toggle case.
editing #editing #case #operators #text-objects #normal-mode
<C-t> / <C-d>
While in Insert mode, you can adjust indentation without switching back to Normal mode.
:set formatprg={program}
Vim's gq operator normally reflows text to fit textwidth, but by setting formatprg you can delegate formatting to any external tool — a language formatter, a
V%
Pressing V% enters visual line mode on the current line and immediately extends the selection to the line containing the matching bracket or brace.
=G
The =G command applies Vim's auto-indent operator (=) from the current line to the last line of the file (G).
g$
The g$ command moves the cursor to the last character of the current screen line, not the end of the logical line.
:compiler gcc | :make
Vim ships with built-in compiler plugins that configure makeprg and errorformat for popular tools.
:nnoremap ]b :bnext<CR>
Mapping ]b and [b to :bnext and :bprev creates an intuitive bracket-style navigation for buffers, matching the convention used by unimpaired.
buffers-windows #buffers-windows #navigation #mapping #buffers
gv
The gv command reselects the exact same area that was last selected in visual mode.
:set cursorlineopt=number
When cursorline is enabled, Vim highlights the entire line the cursor is on.
<C-o>zz
When you are typing in insert mode and the cursor drifts near the top or bottom of the screen, you normally have to press , then zz, then i or a to continue edi
g]
g] is the disambiguation-aware alternative to .