diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-08-26 02:23:58 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-08-26 02:23:58 -0400 |
commit | c2a8f06bbaa5a8a187b1b9ca80676c20dc7a0a49 (patch) | |
tree | cd7a04678a9934b6b353bb5e646490502b10033b | |
parent | e11b23e357ca797211c4e11f3f87ddb0dac98a99 (diff) | |
parent | 75f164c43ff32de93ac3ed2c32a1ccf8e6cb4c0a (diff) | |
download | rneovim-c2a8f06bbaa5a8a187b1b9ca80676c20dc7a0a49.tar.gz rneovim-c2a8f06bbaa5a8a187b1b9ca80676c20dc7a0a49.tar.bz2 rneovim-c2a8f06bbaa5a8a187b1b9ca80676c20dc7a0a49.zip |
Merge pull request #1087 from fwalch/archlinux-filetypes
Runtime: Support Arch Linux/Pacman file types.
-rw-r--r-- | runtime/filetype.vim | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index dac44d72af..a6b918a0f2 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -17,7 +17,7 @@ augroup filetypedetect " Ignored extensions if exists("*fnameescape") -au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.dpkg-dist,?\+.dpkg-old,?\+.dpkg-new,?\+.dpkg-bak,?\+.rpmsave,?\+.rpmnew +au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.dpkg-dist,?\+.dpkg-old,?\+.dpkg-new,?\+.dpkg-bak,?\+.rpmsave,?\+.rpmnew,?\+.pacsave,?\+.pacnew \ exe "doau filetypedetect BufRead " . fnameescape(expand("<afile>:r")) au BufNewFile,BufRead *~ \ let s:name = expand("<afile>") | @@ -1843,11 +1843,19 @@ au BufNewFile,BufRead catalog setf catalog au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog') " Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc. -" Gentoo ebuilds are actually bash scripts -au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash_profile*,.bash_logout*,*.bash,*.ebuild call SetFileTypeSH("bash") +" Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts +au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash_profile*,.bash_logout*,*.bash,*.ebuild,PKGBUILD* call SetFileTypeSH("bash") au BufNewFile,BufRead .kshrc*,*.ksh call SetFileTypeSH("ksh") au BufNewFile,BufRead */etc/profile,.profile*,*.sh,*.env call SetFileTypeSH(getline(1)) +" Shell script (Arch Linux) or PHP file (Drupal) +au BufNewFile,BufRead *.install + \ if getline(1) =~ '<?php' | + \ setf php | + \ else | + \ call SetFileTypeSH("bash") | + \ endif + " Also called from scripts.vim. func! SetFileTypeSH(name) if expand("<amatch>") =~ g:ft_ignore_pat |