From c8816903f0dbae151385f7198610f24ad945c01d Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 26 Jun 2018 10:51:06 +1200 Subject: Refactor filetype-specific .vimrc material Put filetype bindings into a separate file filemap.vim at the same level as filetype.vim, to be loaded directly after the "filetype" command. This removes per-filetype logic one step from ~/.vimrc, which seems appropriate, and also allows me to use long line breaks in the new file. --- vim/filetype.vim | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'vim/filetype.vim') diff --git a/vim/filetype.vim b/vim/filetype.vim index 69847ba7..66b26455 100644 --- a/vim/filetype.vim +++ b/vim/filetype.vim @@ -324,15 +324,15 @@ augroup filetypedetect \,bash_logout \,bash_profile \,bashrc - \ let b:is_bash = 1 - \ | setfiletype sh + \ let b:is_bash = 1 + \|setfiletype sh " Korn shell autocmd BufNewFile,BufRead \ ?*.ksh \,.kshrc \,kshrc - \ let b:is_kornshell = 1 - \ | setfiletype sh + \ let b:is_kornshell = 1 + \|setfiletype sh " POSIX/Bourne shell autocmd BufNewFile,BufRead \ ?*.sh @@ -347,8 +347,8 @@ augroup filetypedetect \,shinit \,shrc \,xinitrc - \ let b:is_posix = 1 - \ | setfiletype sh + \ let b:is_posix = 1 + \|setfiletype sh " sed files autocmd BufNewFile,BufRead \ ?*.sed @@ -495,17 +495,17 @@ augroup filetypedetect " been found; strip temporary extension and re-run autocmd BufNewFile,BufRead \ /var/tmp/?*.???????? - \ if !did_filetype() - \ | call s:StripRepeat() - \ | endif + \ if !did_filetype() + \| call s:StripRepeat() + \|endif " If we *still* don't have a filetype, run the scripts.vim file that will " examine actual file contents--but only the first one; don't load the " system one at all autocmd BufNewFile,BufRead,StdinReadPost \ * - \ if !did_filetype() - \ | runtime scripts.vim - \ | endif + \ if !did_filetype() + \| runtime scripts.vim + \|endif augroup END -- cgit v1.2.3