How do I change the cursor shape for different Vim modes in the terminal?
:let &t_SI = "\e[6 q"
Modern terminals support cursor shape changes via escape sequences.
15 results for "normal mode escape"
:let &t_SI = "\e[6 q"
Modern terminals support cursor shape changes via escape sequences.
:let @q then use in nnoremap
Macros are stored in registers as plain keystroke strings.
<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
<C-h> / <C-w> / <C-u>
Vim provides three levels of deletion directly in insert mode, so you don't need to switch to normal mode for small corrections.
:let @q='commands'
Macros in Vim are stored in registers as plain text.
/\v pattern
The \v flag enables "very magic" mode in Vim regex, where most special characters work like standard regular expressions without needing backslashes.
:'<,'>normal A;
The :normal command executes normal-mode keystrokes on every line in a range.
command-line #command-line #ex-commands #editing #normal-mode #batch-editing
r<CR>
You can split a line at the cursor without entering Insert mode by using r.
:'<,'>norm {commands}
The :normal (or :norm) command lets you execute normal mode keystrokes from the command line.
command-line #editing #ex-commands #normal-mode #productivity #ranges
/foo\|bar
How it works The \ operator in Vim's search pattern works like a logical OR, letting you match any one of several alternatives.
:g/pattern/normal dd
The :g/pattern/normal {commands} command executes normal mode keystrokes on every line in the file that matches the given pattern.
:let @q =
Instead of recording a macro with q, you can assign any string directly to a named register using :let @{register} = 'keys'.
"ap, edit, "ayy
Vim stores macros in registers, which means you can paste a macro's contents into a buffer, edit it as regular text, and yank it back into the register.
/\v
Vim's default regex syntax requires backslashes before most special characters like +, (, ), {, and , which is the opposite of what most developers expect from
:nnoremap / :inoremap / :vnoremap
Vim has two types of key mappings: recursive (:map, :nmap, :imap) and non-recursive (:noremap, :nnoremap, :inoremap).