~ / neovim
12
Neovim Extras
Defaults Neovim adds on top of Vim: Y, commenting with gc, Q, &, visual * and the bracket mappings.
- 01
What Neovim changes: Y and saner defaults
Yyanks to the end of the line,007counts in decimal, and a tour of the defaults.Yyy{count}<C-a>{count}<C-x><C-l>nvim - 02
Room to breathe: [<Space> and ]<Space>
Add empty lines above or below without leaving Normal mode.
[<Space>]<Space>.nvim - 03
Comment lines: gcc and gc{motion}
Toggle comments with the built-in
gcoperator.gccgc{motion}{Visual}gc.nvim - 04
Comment blocks: gcgc, dgc and ygc
Treat a run of commented lines as one text object.
gcgcdgcygc{Visual}gcnvim - 05
Search for the selection: Visual * and #
Select any text and jump to its next or previous copy.
{Visual}*{Visual}#n / N:%s//{new}/gnvim - 06
&: repeat the last substitution
Run your last
:sagain on another line, flags and all.&{count}&:[range]&&:[range]&nvim - 07
Q: replay the last recording
Replay your newest macro without naming it, even once per selected line.
Q{Visual}Q{Visual}@{reg}q{reg} … qnvim