summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrekado <rekado@elephly.net>2016-07-19 10:39:28 +0200
committerrekado <rekado@elephly.net>2016-07-19 10:39:28 +0200
commit50a80ed85fcca2c319896331e229fd1a05424305 (patch)
treee366852fb395b086fb48abc7531eb239dff21829
parent323c0ba0565a3769d4344ad815036ef7e23dd2e3 (diff)
Try to line up indented blocks with their headings.
-rw-r--r--init.org10
1 files changed, 10 insertions, 0 deletions
diff --git a/init.org b/init.org
index cf2f878..c782473 100644
--- a/init.org
+++ b/init.org
@@ -315,6 +315,16 @@ face to be rendered with a monospaced font.
(set-face-attribute face nil :height 0.8))
#+END_SRC
+To ensure that indented blocks line up with their headings despite
+using =variable-pitch-mode= we set the indentation character to =*=
+and hide it by setting the foreground colour to the same as the
+default background colour.
+
+#+BEGIN_SRC elisp
+(setq org-indent-boundary-char ?*)
+(set-face-attribute 'org-indent nil :foreground (face-attribute 'default :background))
+#+END_SRC
+
The following snippet is an attempt to prettify the somewhat ugly
headers of source code blocks in =org-mode=. The snippet was taken
from [[https://pank.eu/blog/pretty-babel-src-blocks.html][the blog of Rasmus Pank]] and slightly modified to suit my needs.