summary refs log tree commit diff
path: root/config.org
diff options
context:
space:
mode:
authornoa@gaiwan.org2024-06-23 18:00:05 +0000
committernoa@gaiwan.org2024-06-23 18:00:05 +0000
commit76ac2d34a4ff36bb6dec929869d533c0de2038de (patch)
treec0cf572e980a800bc2f5e52b46f53507872f1595 /config.org
parent51c0729874ae500496d0a9ac380d9f9eaba0a9b7 (diff)
Add configuration for elastic-table-mode
Diffstat (limited to 'config.org')
-rw-r--r--config.org8
1 files changed, 7 insertions, 1 deletions
diff --git a/config.org b/config.org
index d92b969..2944ce8 100644
--- a/config.org
+++ b/config.org
@@ -935,7 +935,6 @@ I find it useful to see the recursive sizes of directories.  This can be a littl
 #+end_src
 
 ** Indentation: tabs and whitespace settings
-
 In general, my rules for inserting tabs are that the tab key should insert tabs.  I personally prefer tabs to spaces, because tabs work reasonably well whatever font or tab width one chooses to set, whereas spaces are the same width for everyone, except when someone uses a proportional font in which case they are narrower than expected.  Furthermore, people tend to use spaces for alignment, which looks bad when you can't rely on every character being the same width.
 
 However, i'm in the minority, and fighting with the very complicated emacs indentation systems is simply not fun.  That said, i refuse to use a monospaced font.  Luckily the minority is more than one and someone has already done the hard work for me of writing a mode to make spaces for indentation work reasonably well with a proportional font.  That mode is elastic-indent-mode, and it very simply makes leading whitespace characters the same width as the characters on the line above.  It's a simple solution but most of the time it does what i want.
@@ -945,6 +944,13 @@ However, i'm in the minority, and fighting with the very complicated emacs inden
 (add-hook 'prog-mode-hook #'elastic-indent-mode)
 #+end_src
 
+Elastic-table-mode is similar; for tab characters within lines, ensure that they change width to make subsequent lines form a table-like layout.
+
+#+begin_src elisp
+  (require 'elastic-table)
+  (add-hook 'prog-mode-hook #'elastic-table-mode)
+#+end_src
+
 Previously i used a function to naïvely copy the whitespace from the line above.  This is the way that vi, nano, and acme all implement auto-indentation.  However, for now i'm experimenting with using the built-in indentation functions again.  I'm leaving this defun here for posterity.
 
 #+begin_src elisp :tangle no