diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-12-08 22:57:01 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-12-08 22:57:01 +1300 |
commit | 8490630ee7ce6baf14d784676a16321931c7b899 (patch) | |
tree | 25160b0b980a8ac534579382e9e4dc0dda415ab4 /vim/after/indent/html.vim | |
parent | Don't use cache for phpcsff(1df) (diff) | |
download | dotfiles-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/html.vim')
-rw-r--r-- | vim/after/indent/html.vim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vim/after/indent/html.vim b/vim/after/indent/html.vim index a7a085fe..72c92d21 100644 --- a/vim/after/indent/html.vim +++ b/vim/after/indent/html.vim @@ -4,3 +4,12 @@ unlet html_indent_inctags " Don't re-indent lines on right-angle-bracket or enter setlocal indentkeys-=<>>,<Return> let b:undo_ftplugin .= '|setlocal indentkeys<' + +" Use four spaces for indentation +setlocal expandtab +setlocal shiftwidth=4 +let b:undo_ftplugin .= '|setlocal expandtab< shiftwidth<' +if &l:softtabstop != -1 + let &l:softtabstop = &l:shiftwidth + let b:undo_ftplugin .= '|setlocal softtabstop<' +endif |