NeoVim

Describes some standard and custom keyboard mappings used in NeoVim.

NeoVim Common

c-x          Start a terminal
Q            Quit nvim all windows
I            Show hidden files NerdTree
T            Focus NerdTree
+            Cycle through other windows
c-n          Show/unshow NerdTree panel
c-q          Copy to system buffer
alt-<ar>     Move to window in arrow direction
-            Move window down (minus)
_            Move window up (underscore/shift-minus)

Tabs And Splits

s:           Open selected file in vertical split
i:           Open selected file in horizontal split
t:           Open selected file in tab
gt           Next tab
gT           Previous tab
c-w s        Horizontal split
c-w c-s      Horizontal split
:sp [file]   Horizontal split
c-w v        Vertical split
c-w c-v      Vertical split
:vs [file]   Vertical split
:vsp [file]  Vertical split
:tabclose    Close tab

Comments

\ cc         Current line or selected text
\ cu         Uncomment line or selected text
\ cs         Comment with formatted layout

Surrounds

ysw"  <F3>   Surround word with ""
ysW"  <F4>   Surrounds full Word with ""
ys$"  <F5>   Create surrounding "" to end of line
cs'"  <F6>   Change surrounding ' to "
ds"   <F7>   Delete surrounding "
ds'   <F8>   Delete surrounding "
S"           Surround selected visual text with "

Folding

zfm          Create fold of movement m (eg. zf3j)
v zf         Fold visual mode selection
zf`x         Create fold to marker x
:rfo         Create fold for range r (eg. :,+3fo)
zd zD        Delete fold at cursor, or recursively
zE           Delete all folds in window
zo zO        Open one fold, open recursively
zc zC        Close one fold, close recursively
[z ]z        Move to start, end of current open fold
zj zk        Move down, up to start, end of next fold

Windows

c-w w        Cycle through windows
c-w t        Top-left window (ie tree window)
c-w b        Bottom-right window
c-w c        Close window
c-w o        Close other window
c-w r        Rotate windows down/right
c-w R        Rotate windows up/left
c-w =        Make windows equal size
c-w +        Increase window one line
c-w -        Decrease window one line
c-w _        Increase window height highest possible
c-w >        Increase width
c-w <        Decrease width