aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-10-28 14:29:20 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-10-28 14:32:16 +1300
commit2b13fc067386408620442f1bf53e1a057608585d (patch)
treece3831d1ea61a8f9639567067028d17ef40c2ce5
parentCorrect misnamed variable (diff)
downloaddotfiles-2b13fc067386408620442f1bf53e1a057608585d.tar.gz
dotfiles-2b13fc067386408620442f1bf53e1a057608585d.zip
Add TABS.markdown to show how to switch to tabs
This enables me to remove my expensive and rather silly "tabs" feature branch.
-rw-r--r--TABS.markdown26
1 files changed, 26 insertions, 0 deletions
diff --git a/TABS.markdown b/TABS.markdown
new file mode 100644
index 00000000..feeee631
--- /dev/null
+++ b/TABS.markdown
@@ -0,0 +1,26 @@
+Spaces to tabs
+==============
+
+If you prefer tabs to spaces, the following recipe seems to convert everything
+pretty nicely:
+
+ $ find . -name .git -prune -o -name vim -prune -o -type f \
+ -exec sh -c \
+ 'for f;do unexpand -t4 "$f">"$f".tmp;mv "$f" "$f".tmp;done' \
+ _ {} +
+
+ $ find vim -name bundle -prune -o -type f \
+ -exec sh -c \
+ 'for f;do unexpand -t2 "$f">"$f".tmp;mv "$f" "$f".tmp;done' \
+ _ {} +
+
+If you have GNU unexpand(1) and can add `--first-only` to each of those calls,
+the results seem perfect.
+
+You can configure Vim to accommodate this by removing the settings for:
+
+* `expandtab`
+* `shiftround`
+* `shiftwidth`
+* `smarttab`
+* `softtabstop`