aboutsummaryrefslogtreecommitdiff
path: root/vim/filetype.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-26 10:51:06 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-26 10:56:31 +1200
commitc8816903f0dbae151385f7198610f24ad945c01d (patch)
tree57fd5ce529113810f0776f958ef9e98c095831ce /vim/filetype.vim
parent9be8677d0a3f29e054541b45670c1f7f090c5f6d (diff)
downloaddotfiles-c8816903f0dbae151385f7198610f24ad945c01d.tar.gz
dotfiles-c8816903f0dbae151385f7198610f24ad945c01d.zip
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.
Diffstat (limited to 'vim/filetype.vim')
-rw-r--r--vim/filetype.vim24
1 files changed, 12 insertions, 12 deletions
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