Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Edit multiple regions simultaneously in a buffer or a region
Emacs Lisp Shell
Tree: d7d5931566

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
README.org
iedit-lib.el
iedit-rect.el
iedit-tests.el
iedit.el

README.org

Iedit - Edit multiple regions in the same way simultaneously

This package includes Emacs minor modes (iedit-mode and iedit-rectangle-mode) based on a API library (iedit-lib) and allows you to edit one occurrence of some text in a buffer (possibly narrowed) or region, and simultaneously have other occurrences edited in the same way, with visual feedback as you type.

Normal scenario of Iedit mode is like:

  • Highlight certain contents - by press C-; All occurrences of a symbol, string or a rectangle in the buffer or a region may be highlighted corresponding to current mark, point and prefix argument. Refer to the document of `iedit-mode’ for details.
  • Edit one of the occurrences The change is applied to other occurrences simultaneously.
  • Finish - by pressing C-; again

You can also use Iedit mode as a quick way to temporarily show only the buffer lines that match the current text being edited. This gives you the effect of a temporary `keep-lines’ or `occur’. To get this effect, hit C-’ when in Iedit mode - it toggles hiding non-matching lines.

Renaming refactoring is convinient in Iedit mode

  • The symbol under point is selected as occurrence by default and only complete symbols are matched
  • With digit prefix argument 0, only occurrences in current function are matched
  • Restricting symbols in current region can be done by pressing C-; again
  • Last renaming refactoring is remembered and can be applied to other buffers later

Iedit-rectangle-mode provides rectangle support with visible rectangle highlighting, which is similar with cua mode rectangle support. But it’s lighter weight and uses iedit mechanisms.

There are also some other facilities you may never think about. Refer to the document of function `iedit-mode’ (C-h f iedit-mode RET) for more details.

Something went wrong with that request. Please try again.