+ Updated docstring (and added two more examples)
+ Can now be used with shell command strings or string lists. String
sublists can have more than 2 elements. Non-string items will be
interpolated into the string before it. If any non-string item is nil,
its sublist is omitted entirely.
+ Can now be used to redefine formatters predefined by the format-all
package, by passing the formatter's name (as a symbol) as the first
argument.
+ Added :modes property for cases when first argument isn't a major mode
or list of them (when redefining a formatter).
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 is much too unpredictable, considering the variable nature of elisp
indentation, and the possibility that certain functions and their indent
behavior may not be defined/declared when the file is being formatted.
Also renames +format|on-save to +format|buffer for clarity. It should
not (normally) be used directly. Use `+format|enable-on-save-maybe` and
`+format|enable-on-save`.
+ Fixes function/command formatters (like #'gofmt)
+ Fixes formatting by region
+ Adds default keybindings:
+ gQ evil operator
+ SPC c f (normal mode) to format buffer
+ SPC c f (visual mode) to format selection
Centralized code formatting with built-in support for a variety of
languages. Provides the set-formatter! function for defining your own.
Still experimental and needs more testing!