aboutsummaryrefslogtreecommitdiff
path: root/vim/after
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-12-11 14:19:50 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-12-11 14:19:50 +1300
commitf0b8e1f6c539168e6c429d39d82b45f2f59185eb (patch)
tree24b2e0128ed07268394ee8509353494573bb7565 /vim/after
parentReset most of my sh.vim customizations (diff)
downloaddotfiles-f0b8e1f6c539168e6c429d39d82b45f2f59185eb.tar.gz
dotfiles-f0b8e1f6c539168e6c429d39d82b45f2f59185eb.zip
Adjust shell type detection rules
Diffstat (limited to 'vim/after')
-rw-r--r--vim/after/ftdetect/sh.vim32
1 files changed, 9 insertions, 23 deletions
diff --git a/vim/after/ftdetect/sh.vim b/vim/after/ftdetect/sh.vim
index 72d72d1d..3a9fa531 100644
--- a/vim/after/ftdetect/sh.vim
+++ b/vim/after/ftdetect/sh.vim
@@ -1,31 +1,17 @@
-" .shrc is a shell script
+" Names/paths of things that are Bash shell script
autocmd BufNewFile,BufRead
- \ .shrc
- \ setlocal filetype=sh
-
-" .xinitrc is a shell script
-autocmd BufNewFile,BufRead
- \ .xinitrc
- \ setlocal filetype=sh
-
-" Files in /etc/default are shell script
-autocmd BufNewFile,BufRead
- \ /etc/default/*
- \ setlocal filetype=sh
-
-" Files in **/.dotfiles/sh/** are shell script
-autocmd BufNewFile,BufRead
- \ **/.dotfiles/sh/**
+ \ **/.dotfiles/bash/**,bash-fc-*
+ \ let g:is_bash = 1 |
\ setlocal filetype=sh
-" Edited bash command lines are Bash script
+" Names/paths of things that are Korn shell script
autocmd BufNewFile,BufRead
- \ bash-fc-*
- \ let g:is_bash = 1 |
+ \ **/.dotfiles/pdksh/**,.pdkshrc,*.pdksh
+ \ let g:is_kornshell = 1 |
\ setlocal filetype=sh
-" Files in **/.dotfiles/bash/** are Bash script
+" Names/paths of things that are POSIX shell script
autocmd BufNewFile,BufRead
- \ **/.dotfiles/bash/**
- \ let g:is_bash = 1 |
+ \ **/.dotfiles/sh/**,.shinit,.shrc,.xinitrc,/etc/default/*
+ \ let g:is_posix = 1 |
\ setlocal filetype=sh