How do I insert the current date or time into the buffer using Vim's built-in expression evaluation?
:put =strftime('%Y-%m-%d')
The :put = command inserts the result of a Vimscript expression directly into the buffer as a new line.
953 results for ":normal"
:put =strftime('%Y-%m-%d')
The :put = command inserts the result of a Vimscript expression directly into the buffer as a new line.
:ALEToggle
The ALE (Asynchronous Lint Engine) plugin provides real-time linting and automatic fixing for dozens of languages without blocking your editor.
:@a
How it works The command :@a executes the contents of register a as an Ex command.
:%!xxd
Vim can serve as a hex editor by piping buffer contents through xxd, a hex dump utility that ships with Vim.
grn
Neovim 0.
:v/pattern/d
The :v command (short for :vglobal) is the inverse of :g — it executes a command on every line that does not match the given pattern.
command-line #editing #ex-commands #search #filtering #productivity
<C-t> and <C-d> in insert mode
When typing in insert mode, you can adjust the current line's indentation without leaving to normal mode.
:silent!
The :silent! modifier runs an Ex command without displaying any output or error messages.
:%s/\<word\>/replacement/g
How it works In Vim's regular expressions, \ are word boundary anchors: \ matches the end of a word.
:/pattern1/,/pattern2/
Ex command ranges in Vim are not limited to line numbers and marks — you can use /pattern/ as a range boundary to select lines between any two matching patter
:packadd termdebug
Vim ships with a built-in termdebug plugin that integrates GDB directly into the editor.
<C-w>P
The preview window is a special auxiliary split — usually at the top — opened by commands like :ptag, :pedit, and omni-completion to display reference infor
<C-r>0
In Insert mode, {reg} pastes the contents of any register inline at the cursor.
\%^ and \%$
Vim's ^ and $ anchors match the start and end of a line, but sometimes you need to match the very beginning or very end of the entire buffer.
:set synmaxcol=200
The synmaxcol option tells Vim the maximum column up to which it will apply syntax highlighting on each line.
:let @q = substitute(@q, "old", "new", "g")
Vim macros are stored as plain text in registers, which means you can inspect and modify them like any other string.
<C-r><C-o>
When you paste a register in insert mode with {reg}, Vim inserts the text as if you had typed it — which means auto-indent, abbreviation expansion, and other
registers #registers #insert-mode #paste #autoindent #editing
:e archive.tar::path/to/file
Vim's built-in tar.
<C-r><C-o>{reg}
When you use a in insert mode to paste register a, Vim inserts the text as if you typed it character by character.
:set statusline=%f\ %m%r%h%w\ %=%l/%L\ %p%%
Vim's statusline option accepts printf-style format codes that display file info, position, mode, and any custom expression.