Move to Normal mode, abandon command-line
Ctrl-\ Ctrl-n
Example
Command-line 0 / 1Normal 1 / 1Move to Normal mode, abandon command-line.
Command line
- Prompt
:let g:exampleCount = 9- Insertion column
23- Editing mode
Insert- Completion menu
inactive
Command history
Vim messages
Empty
- Last status message
- Last warning
Example variables
- g:exampleCount
0
Move to Normal mode, abandon command-line
Command line
- Prompt
- Insertion column
0- Editing mode
Inactive- Completion menu
inactive
Command history
- 1
let g:exampleCount = 9
Vim messages
Empty
- Last status message
- Last warning
Example variables
- g:exampleCount
0
Before & after
Before
Command line
- Prompt
:let g:exampleCount = 9- Insertion column
23- Editing mode
Insert- Completion menu
inactive
Command history
Vim messages
Empty
- Last status message
- Last warning
Example variables
- g:exampleCount
0
After
Command line
- Prompt
- Insertion column
0- Editing mode
Inactive- Completion menu
inactive
Command history
- 1
let g:exampleCount = 9
Vim messages
Empty
- Last status message
- Last warning
Example variables
- g:exampleCount
0
Start in Command-line mode. The prompt contains a pending assignment of 9, while g:exampleCount is visibly 0. This cancellation leaves the variable at 0 because the assignment is not submitted.
one two
three four
five six
keepCursor on line 1, column 1Details & Vim help
Example replayed in Vim
Move to Normal mode, abandon command-line. Use while editing a : command or / or ? search prompt; this edits or controls that prompt rather than running an Ex command. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.