This redesigns how format-all applies changes. Before, it would erase the buffer and insert the formatted result. This would throw markers out of whack, and usually meant the cursor would end up somewhere else (e.g. the beginning of the file). Now, changes are made to the buffer line by line, via RCS patch. Other changes: + +format-region function was removed (replaced by +format-buffer and +format/region). + set-formatter! was moved to autoload/settings.el + New +format/buffer command to replace format-all-buffer
8 lines
322 B
EmacsLisp
8 lines
322 B
EmacsLisp
;;; editor/format/autoload/evil.el -*- lexical-binding: t; -*-
|
|
;;;###if (featurep! :feature evil)
|
|
|
|
;;;###autoload (autoload '+format:region "editor/format/autoload/evil" nil t)
|
|
(evil-define-operator +format:region (beg end type)
|
|
"Evil ex interface to `+format/region'."
|
|
(interactive "<R>")
|
|
(+format/region beg end))
|