Navigating Expressions

Jumping between expressions and within nested expressions is an effective way to navigate your Clojure code

Spacemacs Major mode Emacs Evil Command Description
C-M-a Jump to start or previous expression
C-M-e Jump to end of or next expression
C-k Kill to end of structure
C-M-f Jump into next expression
C-M-b Jump into previous expression

Jumping around

TODO: Video of jumping around

Killing code softly

Using C-k allows to delete (put on the kill ring) a section of code without messing up the structure of your code.

So if you are in a string, you can delete the contents of a string without accidentally deleting the double quotes. The same applies to a list, map or any other structure.

TODO: test these commands

Emacs Command Description
C-M-n forward-list Move forward over a parenthetical group
C-M-p backward-list Move backward over a parenthetical group
C-M-k kill-sexp Kill balanced expression forward
C-M-SPC mark-sexp Put the mark at the end of the sexp.

Reference

results matching ""

    No results matching ""