Clojure specific refactor toolsλ︎
, r is the refactor menu in Spacemacs which contains commands specific to refactor Clojure code. These complement the Evil tools and structural editing
The default refactor tools are part of the clojure-mode
package and work even when the REPL is not running. The optional clj-refactor commands mostly require a running REPL to work.
Refactor menuλ︎
Keybinding | Description |
---|---|
, r ? | Display help on how to enable clj-refactor package in the Clojure layer |
, r n | add namespace at top of current buffer |
, r N | add namespace at current point |
, r # | convert collection to a set #{} |
, r c | convert collection to a quoted list |
, r ++open-paren++ | convert collection to a list |
, r : | cycle between keyword and string |
, r [ | convert collection to a vector |
, r { | convert collection to a hash-map |
, r i | cycle between if and if-not |
, r p | cycle privacy of vars, defn /defn- & def /`def ^:private** |