Skip to content

Navigating codeλ︎

Jumping, marks, code folding and searching are effective ways of navigating a codebase, rather than using the arrow keys to move character by character or line by line.

General Toolsλ︎

Use Evil normal mode to quickly jump around your code.

Key binding Description
SPC j j Search across all windows for given character(s), type highlighted character(s) to jump to location
SPC j C Jump to first unbalanced parens
SPC j c / ' ' Jump to last change
m x , ' x Create marker called x, jump to marker called x (use any alphabet character) (see markers section)
# Symbol highlight transient state - navigate symbol names, iedit, swoop
SPC s s Search in current buffer, C-j/C-k to navigate results
SPC s p Search in project, C-j/k to navigate results

Code Foldingλ︎

Folding code hides away details, so you can just look at the function definitions and data structures of interest on the same screen.

Key binding Description
z or SPC z . folding code blocks

z opens a menu to allow you to un/fold your code quickly.

Spacemacs Zoom menu

SPC z . is the code fold transient menu should you wish to un/fold code many times.

See the code folding section for more details.

Structural Editingλ︎

SPC k starts lisp state structural editing.

hjkl to navigate the cursor across symbols and open/close parens

Spacemacs Structural Editing - Lisp state menu