How do I build a custom statusline without plugins?
: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.
245 results for ""+p"
: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.
"/p
Vim stores the last search pattern in the search register "/.
"%p
The % register in Vim always contains the name of the current file.
registers #registers #editing #insert-mode #productivity #filename
".p
The ".
registers #registers #editing #insert-mode #normal-mode #productivity
ciw""<Esc>P
Vim doesn't have a built-in "surround" operator, but you can wrap any word in quotes or brackets with a short sequence: ciw""P.
editing #editing #text-objects #normal-mode #productivity #surround
<C-n> / <C-p>
Vim has a powerful built-in completion system that requires zero plugins.
dit
The dit command deletes the text inside the nearest enclosing HTML or XML tag pair without removing the tags themselves.
:set clipboard=unnamedplus
Setting clipboard=unnamedplus makes Vim's default yank and paste use the system clipboard.
<C-v>jjxp
Visual block mode lets you select, cut, and paste rectangular columns of text.
%:t:r
Vim's % special character expands to the current filename and accepts a chain of colon-delimited modifiers.
command-line #command-line #ex-commands #editing #navigation
". / "% / ": / "# registers
Vim has four read-only special registers that automatically contain useful contextual information.
registers #registers #special-registers #workflow #productivity
<C-y>,
The emmet-vim plugin brings the full power of Emmet (formerly Zen Coding) to Vim, letting you type a short CSS-like abbreviation and expand it into a complete H
y (in visual mode)
In visual mode, pressing y yanks (copies) the selected text into the default register.
vat
The vat command visually selects the nearest enclosing HTML or XML tag and all of its contents, including the opening and closing tags themselves.
visual-mode #visual-mode #text-objects #editing #normal-mode
yy
The yy command yanks (copies) the entire current line, including the newline character.
:e %:r.html
In Vim's command line, % expands to the current buffer's filename.
command-line #ex-commands #command-line #buffers #navigation
"-
Vim silently stores every deletion of less than one line in the special "- register (the "small delete" register).
vitU
When editing markup-heavy files, you often need to transform only the tag contents while preserving the surrounding structure.
S"
The vim-surround plugin provides the S command in visual mode to wrap any selection with a delimiter pair.
gP
The gP command works like P (paste before the cursor) but leaves your cursor after the pasted text rather than at its beginning.