]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
use rainbow-delimiters in graphics mode
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 23 Oct 2015 13:03:46 +0000 (15:03 +0200)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 23 Oct 2015 13:03:46 +0000 (15:03 +0200)
bba.org

diff --git a/bba.org b/bba.org
index 8d1c63c47a145d66f72276fdc076ac0f3b46e725..0179e0867f08381918a8716ee46aea7356f1a8a2 100644 (file)
--- a/bba.org
+++ b/bba.org
@@ -237,6 +237,21 @@ See [[https://github.com/toctan/smartparens][Smartparens on github]].
         (define-key smartparens-mode-map (kbd "C-'") 'sp-rewrap-sexp)
         ))
 #+END_SRC
+
+* [[https://github.com/Fanael/rainbow-delimiters][rainbow-delimiters]]
+
+Highlight delimiters such as parentheses, brackets or braces according
+to their depth.
+But we use it only in graphical mode as text mode lacks color depth.
+
+#+BEGIN_SRC emacs-lisp
+  (if (>= emacs-major-version 24)
+      (when (display-graphic-p)
+        (add-to-list 'load-path "~/.emacs.d/elpa/rainbow-delimiters-20150320.17")
+        ))
+
+
+#+END_SRC
 * [[https://github.com/hrs/engine-mode][engine-mode]]
 
 search the web on your fingertips. C-c /.
@@ -936,7 +951,8 @@ taken from http://doc.norang.ca/org-mode.org
                     (auto-fill-mode)
                     (flyspell-mode)
                     (define-key org-mode-map "\C-h\C-y" '(lambda () (interactive) (find-file "~/.emacs.d/snippets/org-mode.org")))
-
+                    (when (display-graphic-p)
+                      (rainbow-delimiters-mode))
                     ))
         (add-hook 'text-mode-hook
                   (lambda ()
@@ -1826,6 +1842,7 @@ combine key strokes to access commands even faster.
   (define-key bba/toggle "\S-f" 'follow-mode)
   (define-key bba/toggle "i" 'impatient-mode)
   (define-key bba/toggle "p" 'smartparens-mode)
+  (define-key bba/toggle "r" 'rainbow-delimiters-mode)
   (define-key bba/toggle "s" 'flyspell-mode)
   (define-key bba/toggle "\S-w" 'which-function-mode)
 #+END_SRC