summaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d/init.org
diff options
context:
space:
mode:
authorGravatar Tom Willemse2015-06-17 11:24:23 +0200
committerGravatar Tom Willemse2015-06-17 11:24:23 +0200
commitc057b45cbd1be6f8224ba6a52e8c051475c9245e (patch)
tree4b06629a49f92171088f4a85c3d859118b131f00 /emacs/.emacs.d/init.org
parentca31d5917695f07050e3c772f2209b59210a3a2f (diff)
downloaddotfiles-c057b45cbd1be6f8224ba6a52e8c051475c9245e.tar.gz
dotfiles-c057b45cbd1be6f8224ba6a52e8c051475c9245e.zip
Move hl-indent settings to init.org
Diffstat (limited to 'emacs/.emacs.d/init.org')
-rw-r--r--emacs/.emacs.d/init.org31
1 files changed, 31 insertions, 0 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index f4d8b30..4f5596d 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -1266,6 +1266,37 @@
<<auto-complete-no-quickhelp>>)
#+END_SRC
+** Highlight indentation
+
+ #+BEGIN_SRC emacs-lisp :tangle no
+ (depends-on "hl-indent")
+ #+END_SRC
+
+ Some languages base their ideas of scope on levels of indentation.
+ When these languages get long functions/branches it can get tricky
+ to see where these blocks end. Of course if you have such large
+ functions you might have other problems, but this is sometimes out
+ of your hands. To help, I use =hl-indent-mode=.
+
+ For other languages it might look fun for a little while as well,
+ but since they don't care about indentation as much it can
+ sometimes get messy.
+
+ First, =hl-indent-mode= doesn't have an =;;;###autoload= cookie for its
+ main entry-point, so I add it manually:
+
+ #+BEGIN_SRC emacs-lisp
+ (autoload 'hl-indent-mode "hl-indent" nil t)
+ #+END_SRC
+
+ Then I enable it for the languages I want.
+
+ #+BEGIN_SRC emacs-lisp
+ (add-hook 'python-mode-hook #'hl-indent-mode)
+ (add-hook 'yaml-mode-hook #'hl-indent-mode)
+ (add-hook 'haml-mode-hook #'hl-indent-mode)
+ #+END_SRC
+
* Use Conkeror to browse URLs
Use the generic browse-url function to open URLs in Conkeror.