How do I send commands from a Vim buffer to an embedded terminal?
:term then <C-w>N for normal mode
Vim 8+ and Neovim have a built-in terminal emulator that runs inside a buffer.
command-line #command-line #terminal #workflow #productivity
953 results for ":normal"
:term then <C-w>N for normal mode
Vim 8+ and Neovim have a built-in terminal emulator that runs inside a buffer.
command-line #command-line #terminal #workflow #productivity
: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.
2<C-g>
Pressing prints the current filename, buffer status, and cursor position in the status line.
"=expression<CR>p
The expression register ("=) lets you evaluate any Vimscript expression and paste the result directly into your buffer from normal mode.
registers #registers #editing #normal-mode #productivity #math
:wincmd {key}
:wincmd is the Ex command equivalent of any keystroke.
<C-@>
Pressing (Ctrl + @, which is the NUL character) in insert mode inserts the same text that was typed during the most recent insert session, then immediately retu
:@q
Most macro workflows focus on @q, which replays register q as normal-mode keystrokes.
<C-o>{cmd}
Pressing in insert mode lets you execute one normal mode command and then automatically returns you to insert mode.
"=strftime('%Y-%m-%d %H:%M')<CR>p
The expression register lets you evaluate Vimscript on demand and paste the result immediately.
registers #registers #expression-register #automation #timestamps
:%norm A;
The :%norm command runs normal mode commands on every line in the file (or a range).
autocmd BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
Vim remembers the last cursor position for every file you edit (stored in the viminfo or shada file), but by default it opens files at line 1.
:stopinsert
:stopinsert is an Ex command that immediately exits insert (or replace) mode and returns to normal mode.
command-line #insert-mode #ex-commands #autocommands #normal-mode
X
The X command deletes the character to the left of the cursor (before it).
<C-w>N
When using Vim's built-in :terminal, the buffer is in Terminal-Job mode by default, meaning all keystrokes go to the running shell.
:keepjumps {command}
The :keepjumps modifier lets you run any movement or command without recording a new entry in the jump list.
navigation #navigation #ex-commands #jump-list #normal-mode #vimscript
:'a,'bnormal! @q<CR>
When you need to replay a macro on a precise region, selecting lines manually can be slow and error-prone.
"=2+3<CR>p
The expression register = evaluates a Vimscript expression and stores the result.
R
Replace mode lets you type over existing text one character at a time, like the "Insert" key behavior in traditional editors.
@='A;<Esc>'<CR>
Recorded macros are powerful, but sometimes you need a quick ephemeral sequence and do not want to occupy a register.
:[range]norm @{register}
The :normal command executes normal-mode keystrokes on each line in a range — including macro playback.