From 627a62f39d91506a82b63fd1c094aed323c7d894 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 30 Oct 2017 14:54:55 +1300 Subject: Add some more file-specific indent preferences For some languages in which I write often: C, HTML, Perl, PHP, and shell scripts. All of these values presently match the defaults specified in config/indent.vim, but for languages I commonly use it's probably appropriate to have files to set the indent settings explicitly anyway, especially if we switched from a filetype with different values. --- vim/ftplugin/html.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'vim/ftplugin/html.vim') diff --git a/vim/ftplugin/html.vim b/vim/ftplugin/html.vim index 38b71656..654aa407 100644 --- a/vim/ftplugin/html.vim +++ b/vim/ftplugin/html.vim @@ -1,3 +1,10 @@ +" Explicitly set indent level; this matches the global default, but it's tidy +" to enforce it in case we changed from a filetype with different value (e.g. +" VimL) +setlocal shiftwidth=4 +setlocal softtabstop=4 +setlocal tabstop=4 + " Run tidy -eq -utf8 on file for the current buffer nnoremap v :exe "!tidy -eq -utf8 " . shellescape(expand("%")) -- cgit v1.2.3