Skip to content

Instantly share code, notes, and snippets.

@soh-i
Created July 1, 2012 00:59
Show Gist options
  • Save soh-i/3026323 to your computer and use it in GitHub Desktop.
Save soh-i/3026323 to your computer and use it in GitHub Desktop.
perltidy
(defun perltidy-region ()
"Run perltidy on the current region."
(interactive)
(save-excursion
(shell-command-on-region (point) (mark)"perltidy -q" nil t)))
(defun perltidy-defun()
"Run perltidy on the current defun."
(interactive)
(save-excursion (mark-defun)
(perltidy-region)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment