A linux command to align lines with an equal sign.
Download the x86_64 static binary from releases.
$ cat foo
a = 1
foo = xyz
$ align-equals foo
a = 1
foo = xyz
See spec
(defun align-equals-region ()
(interactive)
(if (> (point) (mark))
(exchange-point-and-mark))
(call-process-region (point) (mark) "align-equals" t t t)
)
(global-set-key "(AS-YOU-LIKE)" 'align-equals-region)
Run M-x align-equals-region
or some binded key.
a = 1
foo = xyz
↓
a = 1
foo = xyz
This works regardless of which emacs mode you are in.
$ make
$ make test
- Fork it (https://github.com/maiha/align-equals/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
- maiha - creator and maintainer