summaryrefslogtreecommitdiffstats
path: root/emacs
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
parentca31d5917695f07050e3c772f2209b59210a3a2f (diff)
downloaddotfiles-c057b45cbd1be6f8224ba6a52e8c051475c9245e.tar.gz
dotfiles-c057b45cbd1be6f8224ba6a52e8c051475c9245e.zip
Move hl-indent settings to init.org
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.el3
-rw-r--r--emacs/.emacs.d/init.org31
2 files changed, 32 insertions, 2 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el
index 56e9668..8a0549d 100644
--- a/emacs/.emacs.d/init.el
+++ b/emacs/.emacs.d/init.el
@@ -36,7 +36,6 @@
(autoload 'tagedit-mode "tagedit" nil t)
(autoload 'tern-mode "tern" nil t)
(autoload 'xmodmap-mode "xmodmap-mode" nil t)
-(autoload 'hl-indent-mode "hl-indent" nil t)
;;;; Macros
@@ -1392,7 +1391,7 @@ from myaethon2.core.decorators import (
(oni:add-hooks 'prog-mode-hook
#'oni:prog-mode-func #'oni:maybe-fci-mode #'rainbow-delimiters-mode
- #'oni:maybe-prettify-symbols-mode #'hl-indent-mode)
+ #'oni:maybe-prettify-symbols-mode)
(oni:add-hooks 'python-mode-hook
(lambda () (setq ac-sources '(ac-source-jedi-direct)))
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.