Created
June 27, 2016 11:29
-
-
Save yveszoundi/3b90779e9a1cf65ac6429c64e0ebb125 to your computer and use it in GitHub Desktop.
Eclim format region or buffer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun eclim-java-format () | |
"Format the source code of the current java source file." | |
(interactive) | |
(let ((positions (if (region-active-p) | |
(list (region-beginning) (region-end)) | |
(list 0 (1- (point-max)))))) | |
(eclim/execute-command "java_format" "-p" "-f" ("-h" (car positions)) ("-t" (cadr positions) ) "-e"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment