How do I create a Neovim mapping that runs an Ex command without entering command-line mode or changing the current mode?
<Cmd>
The pseudo-key in Neovim allows a mapping to execute an Ex command directly, without going through command-line mode.
<Cmd>
The pseudo-key in Neovim allows a mapping to execute an Ex command directly, without going through command-line mode.
:set nomore
When a Vim command produces output that exceeds the terminal height, Vim pauses and displays a -- More -- prompt, requiring you to press a key to continue.
:noautocmd {cmd}
The :noautocmd (abbreviated :noa) prefix suppresses all autocommand events for the duration of the command that follows it.
yos, yow, yol, yon, yoh
The vim-unimpaired plugin adds a set of paired bracket mappings, including a powerful family of option toggles.
v:event
The v:event dictionary is populated inside certain autocommand callbacks with data specific to that event.
b: w: t: s:
Vimscript variables are prefixed with a one-letter scope identifier followed by a colon.
pumvisible()
The pumvisible() function returns 1 when the insert-mode completion popup menu (pum) is visible, and 0 otherwise.
matchadd()
The matchadd() function adds a persistent highlight for a pattern in the current window without touching your search register or interfering with n/N navigation
:set diffopt+=algorithm:patience
Vim's default diff algorithm (Myers) can produce noisy diffs when working with code — it sometimes matches unrelated lines containing common tokens like {, },
:set makeprg=python3\ %
Setting makeprg to include % lets :make always execute the file you're currently editing.
:e $MYVIMRC
The :e $MYVIMRC command opens your Vim or Neovim configuration file instantly, no matter where it lives.
:mkspell ~/.vim/spell/en.utf-8.add
When you add words to your personal spell file with zg, Vim writes them to a plain-text .
:set concealcursor=nv
The 'concealcursor' option controls in which modes concealed text is revealed on the cursor line.
:set sidescroll=1
When wrap is off and the cursor moves past the edge of the screen, Vim jumps the view horizontally by a number of columns determined by sidescroll.
:map <unique> {key} {rhs}
The modifier causes Vim to fail with an error if you try to create a mapping for a key that is already mapped in that mode.
:cnoreabbrev {lhs} {rhs}
:cnoreabbrev defines a non-recursive command-line abbreviation — like noremap but for Ex commands.
{args -> expr}
Vim 8.
:iabbrev <expr> {trigger} {expression}
The flag on :iabbrev turns the right-hand side into a Vimscript expression that is evaluated at expansion time rather than stored as a literal string.
: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.
:let maplocalleader = ','
Vim provides two separate leader keys: (global) and (local to the current buffer).