editor/format: format by diff & major refactor
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
This commit is contained in:
parent
cb5c9cc9ea
commit
4b9233bec7
3 changed files with 266 additions and 193 deletions
|
@ -3,6 +3,6 @@
|
|||
|
||||
;;;###autoload (autoload '+format:region "editor/format/autoload/evil" nil t)
|
||||
(evil-define-operator +format:region (beg end type)
|
||||
"Evil ex interface to `+format-region'."
|
||||
"Evil ex interface to `+format/region'."
|
||||
(interactive "<R>")
|
||||
(+format-region beg end))
|
||||
(+format/region beg end))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue