summaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d/init.org
diff options
context:
space:
mode:
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.