summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2014-04-20 13:34:20 +0200
committerGravatar Tom Willemse2014-04-20 13:34:20 +0200
commita8aec65dfc937c90ef1a1bb9a508c3935eedf6d8 (patch)
tree4958e31f9f53a16fdc4c2274f9dfd64285a8206a
parent4200f050f0a3643cb30ae9e34b567a7febdc4904 (diff)
downloademacs-a8aec65dfc937c90ef1a1bb9a508c3935eedf6d8.tar.gz
emacs-a8aec65dfc937c90ef1a1bb9a508c3935eedf6d8.zip
Move tab width setting to init.org
-rw-r--r--.emacs.d/init.el1
-rw-r--r--.emacs.d/init.org22
2 files changed, 22 insertions, 1 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 1c02126..bbda377 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -910,7 +910,6 @@ from myaethon2.core.decorators import (
;;;; Unconditional settings
-(setq-default tab-width 4)
(setq-default truncate-lines t)
(setq custom-file "~/.emacs.d/custom.el")
diff --git a/.emacs.d/init.org b/.emacs.d/init.org
index 4f07cf3..43c9c89 100644
--- a/.emacs.d/init.org
+++ b/.emacs.d/init.org
@@ -486,6 +486,26 @@
(setq-default indent-tabs-mode nil)
#+END_SRC
+** Use four spaces for indentation
+
+ I once, long ago, started out with using eight spaces for each
+ level of indentation. Although I think, technically, I was using
+ tabs. This means that even just 3 levels of indentation take up a
+ /huge/ amount of space that can't be used for anything else. Since I
+ also try to limit the length of the lines in my code, this can make
+ for very little code per line.
+
+ I also tried (and enjoyed) two spaces, but after a while, looking
+ at bigger files, I noticed that it all becomes a blur. Two spaces
+ is not a big-enough visual difference to make code read nicely, in
+ my opinion.
+
+ So far, I have quite enjoyed four spaces for most code[fn:4].
+
+ #+BEGIN_SRC emacs-lisp
+ (setq-default tab-width 4)
+ #+END_SRC
+
* Notes
Here are some random or somewhat general notes about things you may
@@ -516,3 +536,5 @@
[fn:2] https://github.com/sabof/svg-mode-line-themes
[fn:3] http://stackoverflow.com/questions/22175214/automatically-switch-language-in-gnus-depending-on-recipient
+
+[fn:4] I still use 2 spaces for some languages, like HTML.