Using Iedit mode in Spacemacs

Spacemacs defines two states

  • iedit state
  • iedit-insert state

Iedit can be started from search with SPC s e

Evil commands to go in insert mode will switch to iedit-insert state All commands have default Vim behavior when used outside of an occurrence

Region can be narrowed with visual selection.

Exited with C-g executed on matches or double ESC

In iedit mode

Key Binding Description
TAB Jump to next occurrence
0 go to beginning of current occurrence
$ go to the end of the current occurrence
# prefix all occurrences with number
C-U down-case the occurrence
U up case the occurrences

Using iedit to replace all occurrence in project

  • Search with SPC /
  • Enter in edit mode C-c C-e
  • Go to the occurrence and enter in iedit state with SPC s e
  • Edit and then leave the iedit state
  • Exit edit mode C-c C-c

Leave a Comment