summaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d/init.org
diff options
context:
space:
mode:
authorGravatar Tom Willemse2014-10-23 16:48:30 +0200
committerGravatar Tom Willemse2014-10-23 16:48:30 +0200
commit039e4454525255a7b93a9fab4daf6e75e06f7b4f (patch)
treebe471e6348e7dbb9a9170944b69199f9c55bce4a /emacs/.emacs.d/init.org
parent4baea6bdac339d2b329b84eb40d22a11c66f818f (diff)
downloaddotfiles-039e4454525255a7b93a9fab4daf6e75e06f7b4f.tar.gz
dotfiles-039e4454525255a7b93a9fab4daf6e75e06f7b4f.zip
Add section on programming mode customizations
Diffstat (limited to 'emacs/.emacs.d/init.org')
-rw-r--r--emacs/.emacs.d/init.org41
1 files changed, 27 insertions, 14 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index 8075ddc..7cf8144 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -975,16 +975,7 @@
(local-unset-key (kbd "RET")))))
#+END_SRC
-* Automatically indent some modes
-
- Some modes, not all, benefit from using =electric-indent-mode=. So
- enable it locally for those modes.
-
- #+BEGIN_SRC emacs-lisp
- (add-hook 'scss-mode-hook #'electric-indent-local-mode)
- #+END_SRC
-
-* Automatically pair in some modes
+* Local minor mode for =electric-pair-mode=
Almost all modes benefit from automatic delimiter pairing, but not
all modes are equal. =paredit= works awesomely for anything lisp-like,
@@ -1008,11 +999,33 @@
)))
#+END_SRC
- And then we just enable it for the interesting modes.
+* Programming
- #+BEGIN_SRC emacs-lisp
- (add-hook 'scss-mode-hook #'oni:electric-pair-local-mode)
- #+END_SRC
+ Emacs is a real programmer's editor, especially so because it's so
+ programmable itself. It also offers modes for a lot of programming
+ languages and 3rd-party packages offer even more.
+
+* SCSS
+
+ - Automatically match parentheses and other delimiters.
+
+ #+BEGIN_SRC emacs-lisp
+ (add-hook 'scss-mode-hook #'oni:electric-pair-local-mode)
+ #+END_SRC
+
+ - Automatically indent code.
+
+ #+BEGIN_SRC emacs-lisp
+ (add-hook 'scss-mode-hook #'electric-indent-local-mode)
+ #+END_SRC
+
+* Haml
+
+ - Automatically match parentheses and other delimiters.
+
+ #+BEGIN_SRC emacs-lisp
+ (add-hook 'haml-mode-hook #'oni:electric-pair-local-mode)
+ #+END_SRC
* Load custom file