diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-11-22 15:51:24 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-11-22 15:51:24 +0100 |
commit | dcbab75db3ba5e812f119e08cda6a02c6b028a14 (patch) | |
tree | c51bd93f109e636ddb01bc03a599cedc4fc42357 /runtime | |
parent | 18dc355395f2eac72ab83d984cacd26ae61c791f (diff) | |
download | vim-git-dcbab75db3ba5e812f119e08cda6a02c6b028a14.tar.gz |
patch 8.2.2032: cabalconfig and cabalproject filetypes not recognizedv8.2.2032
Problem: Cabalconfig and cabalproject filetypes not recognized.
Solution: Detect more cabal files. (Marcin Szamotulski, closes #7339)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/filetype.vim | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 938140203..35b73f929 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -696,12 +696,21 @@ au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc au BufNewFile,BufRead *.haml setf haml " Hamster Classic | Playground files -au BufNewFile,BufRead *.hsc,*.hsm setf hamster +au BufNewFile,BufRead *.hsm setf hamster +au BufNewFile,BufRead *.hsc + \ if match(join(getline(1,10), "\n"), '\%(^\|\n\)\s*\%({-#\_s*LANGUAGE\>\|\<module\>\)') != -1 | + \ setf haskell | + \ else | + \ setf hamster | + \ endif " Haskell au BufNewFile,BufRead *.hs,*.hs-boot setf haskell au BufNewFile,BufRead *.lhs setf lhaskell au BufNewFile,BufRead *.chs setf chaskell +au BufNewFile,BufRead cabal.project setf cabalproject +au BufNewFile,BufRead $HOME/.cabal/config setf cabalconfig +au BufNewFile,BufRead cabal.config setf cabalconfig " Haste au BufNewFile,BufRead *.ht setf haste @@ -2037,12 +2046,14 @@ au BufNewFile,BufRead bzr_log.* setf bzr " Bazel build file if !has("fname_case") - au BufNewFile,BufRead *.BUILD,BUILD setf bzl + au BufNewFile,BufRead *.BUILD,BUILD setf bzl endif " BIND zone au BufNewFile,BufRead */named/db.*,*/bind/db.* call s:StarSetf('bindzone') +au BufNewFile,BufRead cabal.project.* call s:StarSetf('cabalproject') + " Calendar au BufNewFile,BufRead */.calendar/*, \*/share/calendar/*/calendar.*,*/share/calendar/calendar.* |