aboutsummaryrefslogtreecommitdiff
path: root/vim/ftplugin/perl.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-10-30 14:54:55 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-10-30 14:54:55 +1300
commit627a62f39d91506a82b63fd1c094aed323c7d894 (patch)
tree9af80234096be8e16fd135d3082d93ab0406eaa3 /vim/ftplugin/perl.vim
parent2ec6966a06ea4fa55f8a0fcf68e08a6e0c60332a (diff)
downloaddotfiles-627a62f39d91506a82b63fd1c094aed323c7d894.tar.gz
dotfiles-627a62f39d91506a82b63fd1c094aed323c7d894.zip
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.
Diffstat (limited to 'vim/ftplugin/perl.vim')
-rw-r--r--vim/ftplugin/perl.vim7
1 files changed, 7 insertions, 0 deletions
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