diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-28 14:46:59 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-28 14:46:59 +1300 |
commit | a2f391804fda279b8a9d2bf5b1ed55ab49543435 (patch) | |
tree | 2dc86ce4b53f5a2d9211ca94815bce0832fbec1b /TABS.md | |
parent | Correct explanation of ksw(1df) idea (diff) | |
download | dotfiles-a2f391804fda279b8a9d2bf5b1ed55ab49543435.tar.gz dotfiles-a2f391804fda279b8a9d2bf5b1ed55ab49543435.zip |
Rename .markdown files to .md
Diffstat (limited to 'TABS.md')
-rw-r--r-- | TABS.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/TABS.md b/TABS.md new file mode 100644 index 00000000..feeee631 --- /dev/null +++ b/TABS.md @@ -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` |