Practicalli spacemacs iedit refactor rock paper scissors
Channel: Practicalli
Date: 2020-01-03

Using iedit in Spacemacs to refactor a symbol name within a Clojure namespace.


First we select the symbol using `#` to enter the Symbol Highlight Transient State.  This allows us to use `n` and `p` to jump through all the instances of the symbol in the buffer.  If there are instances we do not want to change, we can cancel and apply narrowing `SPC n` to the buffer before editing


Selecting `e` from the Symbol Highlight Transient State enters iedit state, and we can change all the symbol name instances concurrently.


Editing is done with Evil, so `a` to append text after the first character changes to Evil Insert state and we can type in the new name.  As we type, all instances are updated, so we can easily see the results.


Once editing is finished, `ESC` to come out of Evil Insert state, `ESC` again to leave iedit state.  Then we can save our file.