Simple place for me to store the nvim shortcuts I always forget.
Undo: u Redo: R Select all: ggVG (gg - move to start of file, V - line wise visual mode, G go to end of file).
Search in file: /some text/ Replace all: %s/old text/new text/
Moving
Jump to next bracket: % (useful for checking tags are closed etc)
Macros
Record a macro: qa, q1, q2, …etc (q starts record into a register a, 1, 2…etc) Stop recording: q Run macro: @a, @1, @2, …etc (@ runs the macro stored in register a, 1, 2…etc)
Git
Stage Changes: :Gwrite Commit Changes: :Git commit
In the Fugitive summary buffer:
- Press
s
to stage the file under the cursor. - Press
cc
to create a commit.
Turn ON/Off Hidden Characters:
Normal mode. :set list :set nolist