From 29a89c07ec95dfcfa7720d2d3d9fa63b655e7229 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 17 Oct 2016 03:36:54 +0200 Subject: Enable electric pairing in (S)CSS buffers --- emacs/.emacs.d/init.org | 14 ++++++-------- emacs/.emacs.d/init/oni-css-mode-init.org | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 emacs/.emacs.d/init/oni-css-mode-init.org (limited to 'emacs') diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index e0370bd..5b83670 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -716,6 +716,12 @@ To start off, first I need to enable lexical binding. (with-eval-after-load 'sh-mode (load "oni-sh-mode-init")) #+END_SRC + - [[file:init/oni-css-mode-init.org][css-mode]] :: CSS and SCSS mode are used for stylesheets! + + #+BEGIN_SRC emacs-lisp + (with-eval-after-load 'css-mode (load "oni-css-mode-init")) + #+END_SRC + ** Emacs lisp mode Enable paredit mode. @@ -843,14 +849,6 @@ To start off, first I need to enable lexical binding. (add-hook 'makefile-mode-hook 'electric-pair-local-mode) #+END_SRC -** CSS mode - - Enable electric indent mode. - - #+BEGIN_SRC emacs-lisp - (add-hook 'css-mode-hook 'electric-indent-local-mode) - #+END_SRC - ** Clojure mode Install extra font-locking for clojure. diff --git a/emacs/.emacs.d/init/oni-css-mode-init.org b/emacs/.emacs.d/init/oni-css-mode-init.org new file mode 100644 index 0000000..9d92663 --- /dev/null +++ b/emacs/.emacs.d/init/oni-css-mode-init.org @@ -0,0 +1,16 @@ +#+TITLE: CSS + +scss-mode is based on css-mode, so any settings for css-mode also +automatically should work for scss-mode. + +Enable electric pairing. + +#+BEGIN_SRC emacs-lisp + (add-hook 'css-mode-hook 'electric-pair-local-mode) +#+END_SRC + +Enable electric indenting. + +#+BEGIN_SRC emacs-lisp + (add-hook 'css-mode-hook 'electric-indent-local-mode) +#+END_SRC -- cgit v1.2.3-54-g00ecf