normal·mode
~ / neovim
12

Neovim Extras

Defaults Neovim adds on top of Vim: Y, commenting with gc, Q, &, visual * and the bracket mappings.

  1. 01

    What Neovim changes: Y and saner defaults

    Y yanks to the end of the line, 007 counts in decimal, and a tour of the defaults.

    Yyy{count}<C-a>{count}<C-x><C-l>nvim
  2. 02

    Room to breathe: [<Space> and ]<Space>

    Add empty lines above or below without leaving Normal mode.

    [<Space>]<Space>.nvim
  3. 03

    Comment lines: gcc and gc{motion}

    Toggle comments with the built-in gc operator.

    gccgc{motion}{Visual}gc.nvim
  4. 04

    Comment blocks: gcgc, dgc and ygc

    Treat a run of commented lines as one text object.

    gcgcdgcygc{Visual}gcnvim
  5. 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
  6. 06

    &: repeat the last substitution

    Run your last :s again on another line, flags and all.

    &{count}&:[range]&&:[range]&nvim
  7. 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
outside the editor the page is in normal mode: ? keymaps · / find · : commandsfound this useful? ☕ support it ·credits · source · not affiliated with Vim or Neovim