From f0b8e1f6c539168e6c429d39d82b45f2f59185eb Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 11 Dec 2016 14:19:50 +1300 Subject: Adjust shell type detection rules --- vim/after/ftdetect/sh.vim | 32 +++++++++----------------------- 1 file 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 -- cgit v1.2.3