aboutsummaryrefslogtreecommitdiff
path: root/TABS.md
blob: 46c4b58506524b779abe172421141a9ccab10c94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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 in
vim/config/indent.vim for:

* `expandtab`
* `shiftround`
* `shiftwidth`
* `smarttab`
* `softtabstop`