aboutsummaryrefslogtreecommitdiff
path: root/vim/after/indent/vim.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-12-08 22:57:01 +1300
committerTom Ryder <tom@sanctum.geek.nz>2019-12-08 22:57:01 +1300
commit8490630ee7ce6baf14d784676a16321931c7b899 (patch)
tree25160b0b980a8ac534579382e9e4dc0dda415ab4 /vim/after/indent/vim.vim
parentDon't use cache for phpcsff(1df) (diff)
downloaddotfiles-8490630ee7ce6baf14d784676a16321931c7b899.tar.gz
dotfiles-8490630ee7ce6baf14d784676a16321931c7b899.zip
Switch to default tabs, spaces for some filetypes
Lately I've been cooperating a lot with other administrators in managing some config files, and because they all use Vim with no configuration or nearly no configuration, they use tabs for indentation everywhere. This is showing up particularly often in configuration files. It now seems like a good idea to use tabs as the default so I don't have to keep cleaning up these files afterwards. For most of the languages in which I write actual programs, however, I'm sticking with spaces for now.
Diffstat (limited to 'vim/after/indent/vim.vim')
-rw-r--r--vim/after/indent/vim.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/vim/after/indent/vim.vim b/vim/after/indent/vim.vim
index 0767bca0..320e5d7d 100644
--- a/vim/after/indent/vim.vim
+++ b/vim/after/indent/vim.vim
@@ -6,8 +6,9 @@ if !exists('b:undo_indent')
endif
" Observe VimL conventions for two-space indents
+setlocal expandtab
setlocal shiftwidth=2
-let b:undo_indent .= '|setlocal shiftwidth<'
+let b:undo_indent .= '|setlocal expandtab< shiftwidth<'
if &softtabstop != -1
let &l:softtabstop = &l:shiftwidth
let b:undo_indent .= '|setlocal softtabstop<'