[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ANN] Lisp source code formatter in any major mode (including fundamenta
From: |
Tu Do |
Subject: |
[ANN] Lisp source code formatter in any major mode (including fundamental-mode) |
Date: |
Wed, 8 Apr 2015 08:11:56 -0700 (PDT) |
User-agent: |
G2/1.0 |
A few days ago I announced a new released of Srefactor with only a rudimentary
support for Lisp code formatting. Now it is quite complete and can format a 10k
Lisp source file fine in around 10 seconds, with significant time spending on
indentation rather than code rearrangement.
Homepage: https://github.com/tuhdo/semantic-refactor.
Some demos:
- Formatting whole buffer in Clojure: http://i.imgur.com/puTmYJL.gif
- Formatting whole buffer demo in Emacs Lisp: http://i.imgur.com/BNWSL7W.gif
- Transform between one line <--> Multiline: http://i.imgur.com/L8D5tXv.gif
Available Commands:
- srefactor-lisp-format-buffer: format whole buffer
- srefactor-lisp-format-defun: format current defun cursor is in
- srefactor-lisp-one-line: turn the current sexp of the same level into one
line; with prefix argument, recursively turn all inner sexps into one line.
- srefactor-lisp-format-sexp: format the current sexp cursor is in.
The formatting commands are usable on Common Lisp and Scheme as well. With such
formatting tool like this, it would be useful when you try to read your Emacas
Lisp backtrace (which is just one-line unformatted code), other than writing
code.
If there is any problem, please submit an issue report and I will be happy to
fix it.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [ANN] Lisp source code formatter in any major mode (including fundamental-mode),
Tu Do <=