How do I open the command-line window while in the middle of typing a command?
<C-f>
While typing in Vim's command line (after pressing :), pressing opens the command-line window with your current, unfinished command already filled in.
<C-f>
While typing in Vim's command line (after pressing :), pressing opens the command-line window with your current, unfinished command already filled in.
<C-f> (in command line)
Pressing while you are already typing in the Vim command line (:), search line (/ or ?), or input prompt switches you into the command-line window with the curr
command-line #command-line #ex-commands #editing #normal-mode
:wundo {file}
The :wundo {file} command writes the current buffer's entire undo history to a file on disk.
<Up>
In Vim's command line, and navigate history in prefix-filtered mode — they only cycle through past commands that begin with whatever you have already typed.
<C-x><C-v>
The key sequence in insert mode triggers Vim command-line completion — the same completion engine used at the : command prompt.
<C-d> (in command mode)
Pressing in Vim's command line displays the full list of matching completions below the command prompt, without cycling through them one at a time.
command-line #command-line #completion #ex-commands #navigation
:digraphs
:digraphs (abbreviated :dig) displays a full reference table of every digraph registered in Vim.
command-line #editing #special-characters #insert-mode #command-line
:vertical {cmd}
The :vertical command modifier forces any window-opening Ex command to create a vertical split instead of the default horizontal split.
buffers-windows #windows #buffers #command-line #splits #ex-commands
:5t.
The :t ex command (also spelled :copy) copies a range of lines to a target address without touching any register.
:Commands
fzf.
:undolist
Vim's undo history is a tree, not a linear stack.
:[range]center
Vim provides three Ex commands for aligning text within a specified column width: :[range]left, :[range]center, and :[range]right.
command-line #ex-commands #formatting #editing #command-line
:g/pattern/t.
Combining :global with the :t (copy) command and the .
:[range]write >> filename
The >> modifier on :write appends lines to a file instead of overwriting it.
command-line #command-line #ex-commands #file-handling #editing
:w ++p
Neovim's :w ++p flag automatically creates any missing intermediate directories when writing a file.
:e ++enc=utf-8
When Vim opens a file with the wrong encoding — producing garbled text or incorrect characters — you can reload it with a specific encoding using :e ++enc={
:cd -
The :cd - command switches Vim's global working directory back to the previous one, just like cd - in the shell.
:let @a = execute('messages')
The execute() function (added in Vim 8.
<C-a> (command-line mode)
In command-line mode, inserts all completions for the word before the cursor at once, as a space-separated list.
:compiler {name}
The :compiler command loads a compiler plugin from Vim's runtime path, setting both makeprg (the build command) and errorformat (the error parsing pattern) in o