From 216ee6c68fa0c2bf8f9def414cad9855838c89b1 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 14 Oct 2016 00:57:27 +0200 Subject: Add shell script mode config --- emacs/.emacs.d/init.org | 7 +++++++ emacs/.emacs.d/init/sh-mode-init.org | 13 +++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 emacs/.emacs.d/init/sh-mode-init.org diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 0562224..dcbb14b 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -707,6 +707,13 @@ To start off, first I need to enable lexical binding. (with-eval-after-load 'php-mode (load "php-mode-init")) #+END_SRC + - [[file:init/sh-mode-init.org][sh-mode]] :: Used for most types of shell scripting (bash, zsh, + etc.). + + #+BEGIN_SRC emacs-lisp + (with-eval-after-load 'sh-mode (load "sh-mode-init")) + #+END_SRC + ** Emacs lisp mode Enable paredit mode. diff --git a/emacs/.emacs.d/init/sh-mode-init.org b/emacs/.emacs.d/init/sh-mode-init.org new file mode 100644 index 0000000..6a9f394 --- /dev/null +++ b/emacs/.emacs.d/init/sh-mode-init.org @@ -0,0 +1,13 @@ +#+TITLE: Shell Script + +Enable electric pairing in shell script buffers. + +#+BEGIN_SRC emacs-lisp + (add-hook 'sh-mode-hook 'electric-pair-local-mode) +#+END_SRC + +Enable electric indentation in shell script buffers. + +#+BEGIN_SRC emacs-lisp + (add-hook 'sh-mode-hook 'electric-indent-local-mode) +#+END_SRC -- cgit v1.2.3-54-g00ecf