1" Vim filetype plugin file 2" Language: bash 3" Maintainer: Bram Moolenaar 4" Last Changed: 2019 Jan 12 5" 6" This is not a real filetype plugin. It allows for someone to set 'filetype' 7" to "bash" in the modeline, and gets the effect of filetype "sh" with 8" b:is_bash set. Idea from Mahmode Al-Qudsi. 9 10if exists("b:did_ftplugin") 11 finish 12endif 13 14let b:is_bash = 1 15if exists("b:is_sh") 16 unlet b:is_sh 17endif 18if exists("b:is_kornshell") 19 unlet b:is_kornshell 20endif 21 22" Setting 'filetype' here directly won't work, since we are being invoked 23" through an autocommand. Do it later, on the BufWinEnter event. 24augroup bash_filetype 25 au BufWinEnter * call SetBashFt() 26augroup END 27 28func SetBashFt() 29 au! bash_filetype 30 set ft=sh 31endfunc 32