31 results for
"normal mode escape"
How does Ctrl+C differ from Escape when exiting insert mode, and why does it matter?
exits insert mode immediately but silently skips two important side effects that (and its equivalent ) always trigger: abbreviation expansion and InsertLeave au
category:
editing
tags:
#insert-mode
#normal-mode
#editing
#autocmds
How do I change the cursor shape for different Vim modes in the terminal?
Modern terminals support cursor shape changes via escape sequences.
category:
config
tags:
#config
#cursor
#terminal
#visual-feedback
How do I convert a recorded macro into a permanent key mapping?
:let @q then use in nnoremap
Macros are stored in registers as plain keystroke strings.
category:
macros
tags:
#macros
#config
#vimrc
#mappings
#workflow
How do I return to normal mode from absolutely any mode in Vim?
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
category:
navigation
tags:
#normal-mode
#insert-mode
#visual-mode
How do I define or modify a macro directly as a string without recording it?
Macros in Vim are stored in registers as plain text.
category:
macros
tags:
#macros
#registers
#ex-commands
#normal-mode
How do I change the cursor shape to a thin bar in insert mode and a block in normal mode in Neovim?
:set guicursor=n-v-c:block,i-ci-ve:ver25,r-cr:hor20
Neovim's guicursor option lets you assign a distinct cursor shape and style to each mode, providing immediate visual feedback about which mode you are in.
category:
config
tags:
#config
#normal-mode
#insert-mode
#visual-mode
How do I delete characters, words, and lines without leaving insert mode?
Vim provides three levels of deletion directly in insert mode, so you don't need to switch to normal mode for small corrections.
category:
editing
tags:
#editing
#insert-mode
#delete
#productivity
How do I use regular expressions without escaping special characters?
The \v flag enables "very magic" mode in Vim regex, where most special characters work like standard regular expressions without needing backslashes.
category:
search
tags:
#search
#normal-mode
How do I create or edit a Vim macro as a plain string without re-recording it?
Macros are just strings stored in named registers.
category:
macros
tags:
#macros
#registers
#ex-commands
How do I break a line at the cursor position without entering Insert mode?
You can split a line at the cursor without entering Insert mode by using r.
category:
editing
tags:
#editing
#normal-mode
#formatting
How do I add text to the end of every line in a range?
The :normal command executes normal-mode keystrokes on every line in a range.
category:
command-line
tags:
#command-line
#ex-commands
#editing
#normal-mode
#batch-editing
How do I pass special keys like Ctrl or arrow keys to :execute normal! in a Vimscript function or mapping?
:execute "normal! \<{key}>"
When building dynamic :execute normal! calls in Vimscript, you must use double-quoted strings with the \ notation so Vim interprets the special key codes.
category:
macros
tags:
#macros
#ex-commands
#normal-mode
How do I search for multiple alternative patterns at once in Vim?
How it works The \ operator in Vim's search pattern works like a logical OR, letting you match any one of several alternatives.
category:
search
tags:
#search
#normal-mode
#ex-commands
How do I safely use a filename containing special characters in a Vim Ex command?
When building Vim Ex commands dynamically, filenames with spaces, , %, #, [, or other special characters will be misinterpreted — the space looks like an argu
category:
config
tags:
#ex-commands
#normal-mode
How do I run normal mode commands in a script without triggering user-defined key mappings?
When you use :normal {cmd} in a Vimscript function, macro, or Ex command, Vim expands any keys through the user's current mappings first.
category:
macros
tags:
#macros
#ex-commands
#normal-mode
#config
How do I define or modify a macro without recording keystrokes?
Instead of recording a macro with q, you can assign any string directly to a named register using :let @{register} = 'keys'.
category:
macros
tags:
#macros
#registers
#ex-commands
#normal-mode
How do I convert text to title case (capitalize first letter, lowercase the rest of each word)?
Vim's substitute command supports case-conversion escape sequences in the replacement string.
category:
search
tags:
#search
#editing
#normal-mode
#ex-commands
How do I programmatically set a register's content or pre-load a macro using setreg()?
The setreg() VimScript function lets you populate any register with arbitrary content directly from the command line or a script — no recording required.
category:
registers
tags:
#registers
#macros
#vimscript
#normal-mode
How do I run the same normal mode command on every line in a range?
The :normal (or :norm) command lets you execute normal mode keystrokes from the command line.
category:
command-line
tags:
#editing
#ex-commands
#normal-mode
#productivity
#ranges
How do I define or edit a macro's content programmatically without re-recording it?
You can assign a string directly to any register using :let, turning it into a macro instantly.
category:
macros
tags:
#macros
#registers
#vimscript
#normal-mode