Draw pretty unicode tables in org-mode
and orgtbl-mode
.
Very experimental.
Enable the org-pretty-table-mode
in an org buffer and it will
replace the ASCII table borders with beautiful unicode ones. The
replacement is only visual (using display text properties),
nothing in your file is actually changed. The buffer and the file
saved to disc still contains the original ASCII characters (which it
must since that's what org uses for table detection).
You can customize org-pretty-table-charset
to change the border
characters. This mode comes with two built-in "themes", single
horizontal lines and double horizontal lines. See M-x customize-variable RET org-pretty-table-charset RET
.
This package is not yet distributed through package archives and you have to install it manually.
-
Download the
org-pretty-table.el
file into some folder in your hard drive (for example~/.emacs.d/site-lisp
). -
Put the following code into your
~/.emacs.d/init.el
or~/.emacs
file:
(progn
(add-to-list 'load-path "~/.emacs.d/site-lisp")
(require 'org-pretty-table)
(add-hook 'org-mode-hook (lambda () (org-pretty-table-mode))))
-
Evaluate the
progn
block by putting the point on theprogn
and callingC-M-x
(M-x eval-defun
). If unsure, you can also simply restart Emacs. -
Open an org-mode file. Calling
M-: org-pretty-table-mode RET
should print1
in the minibuffer. You're done!
Use Eask to install dependencies:
eask install-deps --dev
Run tests with
eask test buttercup