diff options
-rw-r--r-- | vim/ftplugin/c.vim | 6 | ||||
-rw-r--r-- | vim/ftplugin/html.vim | 7 | ||||
-rw-r--r-- | vim/ftplugin/perl.vim | 7 | ||||
-rw-r--r-- | vim/ftplugin/php.vim | 6 | ||||
-rw-r--r-- | vim/ftplugin/sh.vim | 7 |
5 files changed, 33 insertions, 0 deletions
diff --git a/vim/ftplugin/c.vim b/vim/ftplugin/c.vim new file mode 100644 index 00000000..1be25bf5 --- /dev/null +++ b/vim/ftplugin/c.vim @@ -0,0 +1,6 @@ +" 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 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 <leader>v :exe "!tidy -eq -utf8 " . shellescape(expand("%"))<CR> diff --git a/vim/ftplugin/perl.vim b/vim/ftplugin/perl.vim index dad2ce35..08d41008 100644 --- a/vim/ftplugin/perl.vim +++ b/vim/ftplugin/perl.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 perl -c on file for the current buffer nnoremap <leader>pc :exe "!perl -c " . shellescape(expand("%"))<CR> " Run perlcritic on the file for the current buffer diff --git a/vim/ftplugin/php.vim b/vim/ftplugin/php.vim new file mode 100644 index 00000000..1be25bf5 --- /dev/null +++ b/vim/ftplugin/php.vim @@ -0,0 +1,6 @@ +" 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 diff --git a/vim/ftplugin/sh.vim b/vim/ftplugin/sh.vim index 2b73611e..25e433e7 100644 --- a/vim/ftplugin/sh.vim +++ b/vim/ftplugin/sh.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 + " Default to POSIX shell, as I never write Bourne, and if I write Bash or Ksh " it'll be denoted with either a shebang or an appropriate extension. At the " time of writing, changing this also prompts sh.vim to set g:is_kornshell, |