Skip to content

↑↓ moveEnter openEsc close

Comment or uncomment the selection in Neovim

Neovim 0.11 · 56 shortcuts · checked Nov 2026 · Source: Neovim contributors docs

In Neovim, press G C on Mac, Windows, Linux. Works when: visual mode.

A chord: press each combination in turn.

More Neovim shortcuts: editing

ActionMacWindowsLinux
UndoUUU
RedoCtrlRCtrlRCtrlR
Delete (cut) the lineD,DD,DD,D
Copy (yank) the lineY,YY,YY,Y
Copy (yank) to the end of the lineShiftYShiftYShiftY
Paste after the cursorPPP
Repeat the last change...
Repeat the last :s with its flagsShift7Shift7Shift7
Replay the last recorded macroShiftQShiftQShiftQ
Comment or uncomment the lineG,C,CG,C,CG,C,C

All 12 in editing · All 56 Neovim shortcuts