From 50a80ed85fcca2c319896331e229fd1a05424305 Mon Sep 17 00:00:00 2001 From: rekado Date: Tue, 19 Jul 2016 10:39:28 +0200 Subject: Try to line up indented blocks with their headings. --- init.org | 10 ++++++++++ 1 file changed, 10 insertions(+) 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. -- cgit v1.2.3