How do I add a per-window title bar in Neovim that shows context like the current filename?
:set winbar=%f
Neovim 0.
795 results for "g* g#"
:set winbar=%f
Neovim 0.
=i{ or =ap
The = operator performs smart indentation based on Vim's filetype-aware indent rules.
vim.filetype.add()
vim.
vip=
Pressing = in visual mode re-indents all selected lines according to the current filetype's indent rules — the same engine used by == for a single line, but a
visual-mode #visual-mode #indentation #editing #text-objects
:undolist
Vim's undo history is a tree, not a linear stack.
:keeppatterns {command}
The :keeppatterns modifier runs an Ex command — typically :s, :g, or :v — without modifying @/ (the last search pattern) or the command history.
command-line #ex-commands #search #substitution #command-line #scripting
saghen/blink.cmp
blink.
5:
Typing a count before : in normal mode automatically fills in a line range in the command line.
command-line #command-line #ex-commands #ranges #normal-mode
:let @a = system('cmd')
You can populate any Vim register with the output of an external shell command using :let @{register} = system('{command}').
gm
The gm command moves the cursor horizontally to the middle of the current screen width on the current line.
:vimgrep /pattern/j **/*
By default, :vimgrep jumps your cursor to the first match it finds, which can be disorienting when you just want to collect results and browse them on your own
ysiw"
The ysiw" command wraps the word under the cursor in double quotes using the vim-surround plugin.
:tjump
:tjump {identifier} is the smart tag-jumping command: it jumps directly when there is only one matching tag, but shows an interactive numbered list when multipl
:%s/pattern//gn
The :%s/pattern//gn command counts how many times a pattern appears in the file without making any changes.
:vimgrep // **/*.txt
Using // (an empty pattern) in :vimgrep tells Vim to reuse the last search pattern.
\@<=
The \@<= operator is Vim's zero-width look-behind assertion.
:set formatprg=<cmd>
When formatprg is set, the gq operator pipes the selected text through that external program and replaces it with the program's output.
{Visual}<C-a>
In Visual mode, pressing increments every number within the selection by 1 (or by a given [count]).
:clearjumps
The :clearjumps command wipes the jump list for the current window, giving you a clean slate for and navigation.
qa<C-a>jq
By recording a one-step macro that increments a number and moves down a line, you can bulk-apply across as many lines as needed with a single count.