diff options
author | 2022-02-19 12:40:04 +0500 | |
---|---|---|
committer | 2022-02-21 19:15:00 +0100 | |
commit | e5a55b7fa046e3b23b7f7e5e2224fa9dc74c1052 (patch) | |
tree | 76a2386f0d7f8020ac3974f1d05e4a4c1b1474b3 | |
parent | pkgcheck: add new Syntastic checker (diff) | |
download | gentoo-syntax-e5a55b7fa046e3b23b7f7e5e2224fa9dc74c1052.tar.gz gentoo-syntax-e5a55b7fa046e3b23b7f7e5e2224fa9dc74c1052.tar.bz2 gentoo-syntax-e5a55b7fa046e3b23b7f7e5e2224fa9dc74c1052.zip |
ftdetect/gentoo.vim: set multiple file types
So basically Syntastic shell checks (most importantly "sh" and
"checkbashisms") works for init.d, conf.d and env.d files now. Yay!
Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
Closes: https://github.com/gentoo/gentoo-syntax/pull/44
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r-- | ftdetect/gentoo.vim | 8 | ||||
-rw-r--r-- | plugin/newinitd.vim | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/ftdetect/gentoo.vim b/ftdetect/gentoo.vim index b8c14ac..b89f058 100644 --- a/ftdetect/gentoo.vim +++ b/ftdetect/gentoo.vim @@ -31,20 +31,20 @@ au BufNewFile,BufRead ChangeLog* " /etc/init.d/ scripts au BufNewFile,BufRead /etc/init.d/* - \ set filetype=gentoo-init-d | + \ set filetype=gentoo-init-d.sh | au BufNewFile,BufRead * \ if (getline(1) =~? "#!/sbin/\\(runscript\\|openrc-run\\)") | - \ set filetype=gentoo-init-d | + \ set filetype=gentoo-init-d.sh | \ endif " /etc/conf.d/ scripts au BufNewFile,BufRead /etc/conf.d/* - \ set filetype=gentoo-conf-d + \ set filetype=gentoo-conf-d.sh " /etc/env.d/ scripts au BufNewFile,BufRead /etc/env.d/* - \ set filetype=gentoo-env-d + \ set filetype=gentoo-env-d.sh " /etc/cron.d/ scripts au BufNewFile,BufRead /etc/cron.d/* diff --git a/plugin/newinitd.vim b/plugin/newinitd.vim index f11dd0f..dcc2e1a 100644 --- a/plugin/newinitd.vim +++ b/plugin/newinitd.vim @@ -37,12 +37,12 @@ fun! <SID>MakeNewInitd() 0 endfun -com! -nargs=0 NewInitd call <SID>MakeNewInitd() | set filetype=gentoo-init-d +com! -nargs=0 NewInitd call <SID>MakeNewInitd() | set filetype=gentoo-init-d.sh augroup NewInitd au! autocmd BufNewFile {/*/files/*.{rc*,init*},/etc/init.d/*} - \ call <SID>MakeNewInitd() | set filetype=gentoo-init-d + \ call <SID>MakeNewInitd() | set filetype=gentoo-init-d.sh augroup END " vim: set et foldmethod=marker : " |