How do I add floating scratch buffers, a built-in file picker, and lazygit integration in Neovim using a single plugin?
folke/snacks.nvim
snacks.
2277 results for "@a"
folke/snacks.nvim
snacks.
:[range]normal @q
The :[range]normal @q command replays the macro in register q on every line within a given range.
:cnoremap <C-a> <Home>
Vim's command line has limited navigation by default.
:vert {cmd}
Vim's :vertical modifier (abbreviated :vert) can be prepended to any Ex command that opens a split window to make it open as a vertical split instead of a horiz
buffers-windows #buffers-windows #windows #splits #ex-commands
:s/pattern/\=expression/g
Prefixing the replacement string with \= in a :substitute command tells Vim to evaluate the rest as a VimScript expression rather than literal text.
:sort /pattern/
The :sort /{pattern}/ command sorts lines by their content after the first match of the pattern.
:s/\v(pattern1)(pattern2)/\2\1/
Vim's substitute command supports capture groups (also called backreferences), which let you rearrange matched portions of text.
:/pattern/+N and :/pattern/-N
Vim's Ex command ranges can use search patterns as line addresses, and those addresses can include a numeric offset (+N or -N) to target lines relative to the m
:g/\(.\+\)\n\1/d
The :g command with a backreference pattern can detect and delete consecutive duplicate lines in one pass.
\zs and \ze in a pattern
Vim's \zs ("match start") and \ze ("match end") atoms let you narrow the actual match region within a broader pattern context.
/\%d{decimal}
Vim's regex engine supports special atoms that match characters by their numeric value rather than their glyph.
cr{s/m/c/k/u}
The vim-abolish plugin provides cr{type} coercions that instantly convert the word under the cursor to a different naming convention.
vim.keymap.set('n', '{key}', {fn}, { desc = '{description}' })
When defining keymaps with vim.
:set path^=./src
Vim's :set command supports three operators for modifying list-style options: += appends, -= removes, and ^= prepends.
:nnoremap key command
The :nnoremap command creates a non-recursive normal mode mapping.
:debug normal @q
Recorded macros are powerful, but when one keystroke goes wrong they can fail fast and leave confusing state behind.
:set switchbuf=useopen
The switchbuf option controls how Vim decides where to display a buffer when switching to it via commands like :sb, :cc, :cn, quickfix jumps, or .
buffers-windows #buffers-windows #navigation #ex-commands #config
:let @q .= 'A;<Esc>'
Re-recording a long macro just to add one extra step is slow and error-prone.
<C-w>F
F opens the filename under the cursor in a new horizontal split window and jumps to the line number that follows the filename.
buffers-windows #navigation #buffers-windows #windows #editing
qa0f=20i <Esc>20|C= <Esc>lDjq
How it works Aligning text on a delimiter such as = without plugins requires a clever macro technique.