add vim-whitespace
[webi-installers/.git] / vim-whitespace / whitespace.vim
diff --git a/vim-whitespace/whitespace.vim b/vim-whitespace/whitespace.vim
new file mode 100644 (file)
index 0000000..3b5cf33
--- /dev/null
@@ -0,0 +1,15 @@
+" The default tab width is 8 spaces, which is redonkulous.
+" We'll set it to 4 instead, which is reasonable.
+" (feel free to change to 2, but 3 is right out).
+"
+" Also, I'm not actually sure what the individual options do,
+" but it's something like 'always use spaces' and
+" 'use the same width when typing, tabbing, deleting, moving, etc'
+set tabstop=4
+set shiftwidth=4
+set smarttab
+set expandtab
+set softtabstop=4
+
+" remove trailing whitespace on save
+autocmd BufWritePre * :%s/\s\+$//e