Navigationλ︎
Move the cursor one space at a time
- h move left
- j move down
- k move up
- l move right
Jump along lineλ︎
Move to specific points within a line
- w jump to start of next word
- b jump to start of word
- e jump to end of next word
- $ jumps to end of line
- 0 jumps to start of line
- ^ jumps to first character of line
Uppercase w b e consider word delimited by blank characters
Jump joined-word using W B E
Use w b e movement with a number to move the cursor larger distances
f jumps forward in the current line to the given character
F jumps backward in the current line to the given character
t jumps forward in the current line to before the given character
T jumps backward in the current line to after the given character
Jump around bufferλ︎
- H jump to top of window
- M jump to middle of window
- L jump to bottom of window
- { jump to previous paragraph
- } jump to next paragraph
- gg jump to first character of line
- G jump to first character of line
Use cursor movement with a number to move the cursor larger distances
Relative line numbers for line navigation
Enable relative line numbers to show how far away from the current line each other line is.
Practicalli AstroNvim-Config enables relative line numbers
Jump to a specific line using the number as a command
Navigate position historyλ︎
++ctrl+"o" jumps to a previous postion in the cursor history
++ctrl+"i" jumps to a previous postion in the cursor history
File marksλ︎
Navigate within the current file or globally using file marks.
m followed by a lower case character creates a mark within the current file.
m followed by an upper case character creates a global mark.
` (backtick) followed by a character jumps to the mark created
Space f ' displays marks in telescope popup
File marks within file
m f creates a mark lablled f
` f jumps to the mark labelled f
Global mark to jump between source and test code
m S with the cursor in the source code file.
m T with the cursor in the test code file.
` S to jump to the source code
` T to jump to the source code
Jumplistλ︎
:jumps
shows the Neovim jumplist containing all points from any buffer recently jumped to using neovim commands
- Ctrl o jump back
- Ctrl i jump forward
- ctrl and navigation key (hjkl) to move to changelist window
- q closes the jumplist buffer
Changesλ︎
:changes
shows the Neovim changelist containing all points in the current buffer which have changed
- g ; jump back (previous edit)
- g . jump forward
- ctrl and navigation key (hjkl) to move to changelist window
- q closes the changelist buffer
Navigation menusλ︎
- [ ( & ] ) previous & next paren
- [ brace-left & ] brace-right previous and next square brackets
- [ g & ] g previous and next Git hunks
- [ s & ] s previous and next misspelled word
Search in bufferλ︎
/ searches buffer for the following pattern
- n jumps to next match
- N jumps to previous match
AstroNvim user config enables
incsearch
incremental search andhlsearch
to highlight every search match
Projectsλ︎
: c d followed by a path changes the root directory for Neovim.
Tab completion simplifies typing the new path of the root directory.
AstroNvim rooter
AstroNvim has a built-in project root detection utility that updates the current working directory automatically.