Refactor within a projectλ︎
Space s p (helm-swoop
) searches the text of all project files, displaying the results in a helm popup.
Ctrl+C+Ctrl+e opens the search results in a buffer for editing. Changes in this buffer can be applied back to the relevant files in the project.
#
or *
on a function name (or any text) will select all instances, opening the transient buffer menu.
e starts iedit, placing a cursor on each instance to make multiple simultaneous changes. Multiple cursors or the usual editing commands can also be used to make changes.
Ctrl+C+Ctrl+c to commit the changes and update all the relevant files in the project.
Ctrl+C+Ctrl+k to drop the changes and keep the project files as they were.
Clojure refactor - rename symbol
, r rs renames all occurrences of the symbol at point using clj-refactor rename symbol.
This command requires a running REPL and for all the project code to compile without error.