Files
.emacs.d/mode-customizations/sh-mode.el

22 lines
673 B
EmacsLisp

(add-to-list 'auto-mode-alist '("\\.bash\\'" . sh-mode))
(add-to-list 'auto-mode-alist '("\\.zsh\\'" . sh-mode))
(add-to-list 'auto-mode-alist '("\\.tcsh\\'" . sh-mode))
(add-to-list 'auto-mode-alist '("\\.tmuxtheme\\'" . sh-mode))
(defun customizations-for-sh-mode ()
(interactive)
(flyspell-prog-mode)
(flymake-shell-load)
(linum-mode t)
(fci-mode)
(auto-complete-mode)
(whitespace-mode)
(subword-mode)
(setq sh-basic-offset 2)
(setq sh-indentation 2)
(setq highlight-indentation-offset 2)
(highlight-indentation-mode)
(define-key sh-mode-map (kbd "RET") 'reindent-then-newline-and-indent))
(add-hook 'sh-mode-hook 'customizations-for-sh-mode)