diff options
Diffstat (limited to 'bin/autoindent')
-rwxr-xr-x | bin/autoindent | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/autoindent b/bin/autoindent new file mode 100755 index 0000000..c45da1e --- /dev/null +++ b/bin/autoindent @@ -0,0 +1,10 @@ +#!/bin/bash +file=$1 +sed -i 's/^\s*//' "$file" +emacs --batch "$file" \ + --eval '(setq indent-tabs-mode t)' \ + --eval '(setq ruby-indent-level 4)' \ + --eval '(setq tab-width 4)' \ + --eval '(setq make-backup-files nil)' \ + --eval '(indent-region (point-min) (point-max) nil)' \ + -f save-buffer |