Editing with Vim and iedit
Make multiple matching edits within a buffer
e within visual state and symbol highlight transient state also enables iedit.
# to select all the occurrences of a symbol or word,
e to start iedit
N to jump between occurrences,
TAB to deselect or re-select the specific occurrence
Refining text selection
SPC v selects a word and
v expands the selection.
When a name is separated such as with kebab case,
SPC v v v v can select words-separated-by-dashes, with a
v for each part of the word selection. The same selection works with file paths and URL's.
SPC n, limits the scope of iedit so only the relevant occurrences are changed and reduces the need to deselect unwanted occurrences.
SPC n f narrows the scope to a function,
SPC n r narrows to a pre-selected range.
iedit state key bindings
iedit state changes the behaviour of the following Evil normal state key bindings (every other normal state key binding remains the same)
||go back to normal state|
||toggle selection of current occurrence|
||go to the beginning of the current occurrence|
||go to the end of the current occurrence|
||prefix all occurrences with an increasing number (SPC u to choose starting number).|
||go to the end of the current occurrence and switch to iedit-insert state|
||delete the occurrences|
||restrict the scope to the function|
||go to first occurrence|
||go to last occurrence|
||go to the beginning of the current occurrence and switch to iedit-insert state|
||increase the editing scope by one line below|
||increase the editing scope by one line above|
||restrict the scope to the current line|
||go to next occurrence|
||go to previous occurrence|
||replace occurrences with last yanked (copied) text|
||(substitute) delete the occurrences and switch to iedit-insert state|
||toggle visibility of lines with no occurrence|
||Up-case the occurrences|
||down-case the occurrences|
I have the default Vim behavior when used outside of an