From 59dc636a0dd5dbdaace9eb85854f7113d19565d4 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 29 Apr 2012 02:08:53 +0100 Subject: [PATCH] Indent on "RET" keypress in sh-mode --- mode-customizations/sh-mode.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mode-customizations/sh-mode.el b/mode-customizations/sh-mode.el index e5f547f..97f8d18 100644 --- a/mode-customizations/sh-mode.el +++ b/mode-customizations/sh-mode.el @@ -6,6 +6,7 @@ (setq sh-basic-offset 2) (setq sh-indentation 2) (setq highlight-indentation-offset 2) - (highlight-indentation-mode)) + (highlight-indentation-mode) + (define-key sh-mode-map (kbd "RET") 'reindent-then-newline-and-indent)) (add-hook 'sh-mode-hook 'customizations-for-sh-mode)