diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-04-05 20:01:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-05 20:01:07 -0400 |
commit | cc9f7e717b80208fec79150b99c17eba04535496 (patch) | |
tree | 6d5e29f0bd7c8b293b873f41324fb813238acb7a /runtime | |
parent | 2c4e9c5245285b5a0a76e044b72481dfe6c468ab (diff) | |
parent | ce0153e4f77bf325cd8c7565e55b038a3ad6a11c (diff) | |
download | rneovim-cc9f7e717b80208fec79150b99c17eba04535496.tar.gz rneovim-cc9f7e717b80208fec79150b99c17eba04535496.tar.bz2 rneovim-cc9f7e717b80208fec79150b99c17eba04535496.zip |
Merge pull request #14291 from janlazo/vim-8.2.2709
vim-patch:8.2.{2709,2711,2714,2717}
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/filetype.vim | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 52cd2dcbfd..b7157a14e7 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2020 Apr 29 +" Last Change: 2021 Apr 05 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -1559,11 +1559,10 @@ au BufNewFile,BufRead catalog setf catalog " Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc. " Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts " NOTE: Patterns ending in a star are further down, these have lower priority. -au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD call dist#ft#SetFileTypeSH("bash") +au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.ebuild,*.bash,*.eclass,PKGBUILD,APKBUILD call dist#ft#SetFileTypeSH("bash") au BufNewFile,BufRead .kshrc,*.ksh call dist#ft#SetFileTypeSH("ksh") au BufNewFile,BufRead */etc/profile,.profile,*.sh,*.env call dist#ft#SetFileTypeSH(getline(1)) - " Shell script (Arch Linux) or PHP file (Drupal) au BufNewFile,BufRead *.install \ if getline(1) =~ '<?php' | @@ -2237,8 +2236,11 @@ au BufNewFile,BufRead .reminders* call s:StarSetf('remind') " SGML catalog file au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog') +" avoid doc files being recognized a shell files +au BufNewFile,BufRead */doc/{,.}bash[_-]completion{,.d,.sh}{,/*} setf text + " Shell scripts ending in a star -au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,,PKGBUILD* call dist#ft#SetFileTypeSH("bash") +au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,PKGBUILD*,APKBUILD*,*/{,.}bash[_-]completion{,.d,.sh}{,/*} call dist#ft#SetFileTypeSH("bash") au BufNewFile,BufRead .kshrc* call dist#ft#SetFileTypeSH("ksh") au BufNewFile,BufRead .profile* call dist#ft#SetFileTypeSH(getline(1)) |