How do I paste the last yanked text while in Insert mode without using the unnamed register?
<C-r>0
In Insert mode, {reg} pastes the contents of any register inline at the cursor.
2277 results for "@a"
<C-r>0
In Insert mode, {reg} pastes the contents of any register inline at the cursor.
:set infercase
The infercase option makes Vim's keyword completion smart about capitalization: it adapts each match to reflect the casing of the characters you've already type
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
z. / z-
Vim has scroll-positioning commands that come in two flavors: those that leave the cursor in the current column (zz, zt, zb) and those that also move the cursor
set statusline=%{MyCustomFunc()}
How it works Vim's statusline supports the %{expr} syntax which evaluates a Vimscript expression and displays the result.
:lua vim.diagnostic.config({virtual_text = false})
Neovim's built-in diagnostic system (vim.
vim.wo.number = true / vim.bo.tabstop = 2
Neovim's Lua API exposes three namespaces for setting options with the correct scope: vim.
:set concealcursor=nv
The 'concealcursor' option controls in which modes concealed text is revealed on the cursor line.
<C-k>{char1}{char2}
Vim has a built-in digraph system that lets you insert hundreds of special characters by typing two-character mnemonics.
editing #editing #insert-mode #special-characters #unicode #productivity
v / V / <C-v> (while in visual mode)
When you are already in visual mode and realize you need a different selection type, you do not have to exit and re-enter.
<C-r>=expression<CR>
The expression register ("=) evaluates Vimscript expressions and returns the result.
registers #registers #insert-mode #expression #calculator #vimscript
:set formatoptions
The formatoptions setting is a string of single-character flags that governs Vim's automatic text formatting: when lines wrap, whether comment syntax continues
<C-x><C-i>
Vim's completion mode searches for keyword matches not just in the current buffer, but also in all files reachable via include directives (e.
z<CR> and zt
Both zt and z scroll the view so that the current line lands at the top of the screen, but they differ in one small but important way: z also moves the cursor t
vim.diagnostic.goto_next()
Neovim's built-in vim.
"+p
The "+p command pastes the contents of the system clipboard into Vim.
"1p then u. to cycle through delete history
Vim silently maintains a rolling history of your last 9 deletions in numbered registers "1 through "9.
:only
The :only command closes every window in the current tab page except the one your cursor is in.
vi[
The vi[ command selects the text inside square brackets without including the brackets themselves.
<C-w><C-w>
The (Ctrl+w Ctrl+w) command cycles the cursor to the next window in the current tab.