mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
Merge #9015
This commit is contained in:
@@ -603,9 +603,9 @@ au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
|
|||||||
|
|
||||||
" Git
|
" Git
|
||||||
au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
|
au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
|
||||||
au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig
|
au BufNewFile,BufRead *.git/config,.gitconfig,/etc/gitconfig setf gitconfig
|
||||||
au BufNewFile,BufRead *.git/modules/*/config setf gitconfig
|
|
||||||
au BufNewFile,BufRead */.config/git/config setf gitconfig
|
au BufNewFile,BufRead */.config/git/config setf gitconfig
|
||||||
|
au BufNewFile,BufRead .gitmodules,*.git/modules/*/config setf gitconfig
|
||||||
if !empty($XDG_CONFIG_HOME)
|
if !empty($XDG_CONFIG_HOME)
|
||||||
au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig
|
au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig
|
||||||
endif
|
endif
|
||||||
@@ -1252,9 +1252,9 @@ au BufNewFile,BufRead */etc/protocols setf protocols
|
|||||||
" Pyrex
|
" Pyrex
|
||||||
au BufNewFile,BufRead *.pyx,*.pxd setf pyrex
|
au BufNewFile,BufRead *.pyx,*.pxd setf pyrex
|
||||||
|
|
||||||
" Python, Python Shell Startup Files
|
" Python, Python Shell Startup and Python Stub Files
|
||||||
" Quixote (Python-based web framework)
|
" Quixote (Python-based web framework)
|
||||||
au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc,*.ptl setf python
|
au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc,*.ptl,*.pyi setf python
|
||||||
|
|
||||||
" Radiance
|
" Radiance
|
||||||
au BufNewFile,BufRead *.rad,*.mat setf radiance
|
au BufNewFile,BufRead *.rad,*.mat setf radiance
|
||||||
@@ -1403,8 +1403,8 @@ au BufNewFile,BufRead *.sdl,*.pr setf sdl
|
|||||||
" sed
|
" sed
|
||||||
au BufNewFile,BufRead *.sed setf sed
|
au BufNewFile,BufRead *.sed setf sed
|
||||||
|
|
||||||
" Sieve (RFC 3028)
|
" Sieve (RFC 3028, 5228)
|
||||||
au BufNewFile,BufRead *.siv setf sieve
|
au BufNewFile,BufRead *.siv,*.sieve setf sieve
|
||||||
|
|
||||||
" Sendmail
|
" Sendmail
|
||||||
au BufNewFile,BufRead sendmail.cf setf sm
|
au BufNewFile,BufRead sendmail.cf setf sm
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
" Vim support file to detect file types in scripts
|
" Vim support file to detect file types in scripts
|
||||||
"
|
"
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last change: 2017 Nov 11
|
" Last change: 2018 Feb 03
|
||||||
|
|
||||||
" This file is called by an autocommand for every file that has just been
|
" This file is called by an autocommand for every file that has just been
|
||||||
" loaded into a buffer. It checks if the type of file can be recognized by
|
" loaded into a buffer. It checks if the type of file can be recognized by
|
||||||
@@ -133,7 +133,7 @@ if s:line1 =~# "^#!"
|
|||||||
set ft=ruby
|
set ft=ruby
|
||||||
|
|
||||||
" JavaScript
|
" JavaScript
|
||||||
elseif s:name =~# 'node\(js\)\=\>' || s:name =~# 'rhino\>'
|
elseif s:name =~# 'node\(js\)\=\>\|js\>' || s:name =~# 'rhino\>'
|
||||||
set ft=javascript
|
set ft=javascript
|
||||||
|
|
||||||
" BC calculator
|
" BC calculator
|
||||||
@@ -176,6 +176,10 @@ if s:line1 =~# "^#!"
|
|||||||
elseif s:name =~# 'scala\>'
|
elseif s:name =~# 'scala\>'
|
||||||
set ft=scala
|
set ft=scala
|
||||||
|
|
||||||
|
" Clojure
|
||||||
|
elseif s:name =~# 'clojure'
|
||||||
|
set ft=clojure
|
||||||
|
|
||||||
endif
|
endif
|
||||||
unlet s:name
|
unlet s:name
|
||||||
|
|
||||||
|
@@ -162,7 +162,7 @@ let s:filename_checks = {
|
|||||||
\ 'fetchmail': ['.fetchmailrc'],
|
\ 'fetchmail': ['.fetchmailrc'],
|
||||||
\ 'fgl': ['file.4gl', 'file.4gh', 'file.m4gl'],
|
\ 'fgl': ['file.4gl', 'file.4gh', 'file.m4gl'],
|
||||||
\ 'focexec': ['file.fex', 'file.focexec'],
|
\ 'focexec': ['file.fex', 'file.focexec'],
|
||||||
\ 'forth': ['file.fs', 'file.ft'],
|
\ 'forth': ['file.fs', 'file.ft', 'file.fth'],
|
||||||
\ 'fortran': ['file.f', 'file.for', 'file.fortran', 'file.fpp', 'file.ftn', 'file.f77', 'file.f90', 'file.f95', 'file.f03', 'file.f08'],
|
\ 'fortran': ['file.f', 'file.for', 'file.fortran', 'file.fpp', 'file.ftn', 'file.f77', 'file.f90', 'file.f95', 'file.f03', 'file.f08'],
|
||||||
\ 'framescript': ['file.fsl'],
|
\ 'framescript': ['file.fsl'],
|
||||||
\ 'freebasic': ['file.fb', 'file.bi'],
|
\ 'freebasic': ['file.fb', 'file.bi'],
|
||||||
@@ -171,7 +171,7 @@ let s:filename_checks = {
|
|||||||
\ 'gdmo': ['file.mo', 'file.gdmo'],
|
\ 'gdmo': ['file.mo', 'file.gdmo'],
|
||||||
\ 'gedcom': ['file.ged', 'lltxxxxx.txt'],
|
\ 'gedcom': ['file.ged', 'lltxxxxx.txt'],
|
||||||
\ 'gitcommit': ['COMMIT_EDITMSG', 'MERGE_MSG', 'TAG_EDITMSG'],
|
\ 'gitcommit': ['COMMIT_EDITMSG', 'MERGE_MSG', 'TAG_EDITMSG'],
|
||||||
\ 'gitconfig': ['file.git/config', '.gitconfig', '.gitmodules', 'file.git/modules//config', '/.config/git/config'],
|
\ 'gitconfig': ['file.git/config', '.gitconfig', '.gitmodules', 'file.git/modules//config', '/.config/git/config', '/etc/gitconfig'],
|
||||||
\ 'gitolite': ['gitolite.conf'],
|
\ 'gitolite': ['gitolite.conf'],
|
||||||
\ 'gitrebase': ['git-rebase-todo'],
|
\ 'gitrebase': ['git-rebase-todo'],
|
||||||
\ 'gitsendemail': ['.gitsendemail.msg.xxxxxx'],
|
\ 'gitsendemail': ['.gitsendemail.msg.xxxxxx'],
|
||||||
@@ -322,7 +322,9 @@ let s:filename_checks = {
|
|||||||
\ 'pf': ['pf.conf'],
|
\ 'pf': ['pf.conf'],
|
||||||
\ 'pfmain': ['main.cf'],
|
\ 'pfmain': ['main.cf'],
|
||||||
\ 'php': ['file.php', 'file.php9', 'file.phtml', 'file.ctp'],
|
\ 'php': ['file.php', 'file.php9', 'file.phtml', 'file.ctp'],
|
||||||
\ 'pike': ['file.pike', 'file.lpc', 'file.ulpc', 'file.pmod'],
|
\ 'lpc': ['file.lpc', 'file.ulpc'],
|
||||||
|
\ 'pike': ['file.pike', 'file.pmod'],
|
||||||
|
\ 'cmod': ['file.cmod'],
|
||||||
\ 'pilrc': ['file.rcp'],
|
\ 'pilrc': ['file.rcp'],
|
||||||
\ 'pine': ['.pinerc', 'pinerc', '.pinercex', 'pinercex'],
|
\ 'pine': ['.pinerc', 'pinerc', '.pinercex', 'pinercex'],
|
||||||
\ 'pinfo': ['/etc/pinforc', '/.pinforc'],
|
\ 'pinfo': ['/etc/pinforc', '/.pinforc'],
|
||||||
@@ -347,7 +349,7 @@ let s:filename_checks = {
|
|||||||
\ 'protocols': ['/etc/protocols'],
|
\ 'protocols': ['/etc/protocols'],
|
||||||
\ 'psf': ['file.psf'],
|
\ 'psf': ['file.psf'],
|
||||||
\ 'pyrex': ['file.pyx', 'file.pxd'],
|
\ 'pyrex': ['file.pyx', 'file.pxd'],
|
||||||
\ 'python': ['file.py', 'file.pyw', '.pythonstartup', '.pythonrc', 'file.ptl'],
|
\ 'python': ['file.py', 'file.pyw', '.pythonstartup', '.pythonrc', 'file.ptl', 'file.pyi'],
|
||||||
\ 'quake': ['anybaseq2/file.cfg', 'anyid1/file.cfg', 'quake3/file.cfg'],
|
\ 'quake': ['anybaseq2/file.cfg', 'anyid1/file.cfg', 'quake3/file.cfg'],
|
||||||
\ 'radiance': ['file.rad', 'file.mat'],
|
\ 'radiance': ['file.rad', 'file.mat'],
|
||||||
\ 'ratpoison': ['.ratpoisonrc', 'ratpoisonrc'],
|
\ 'ratpoison': ['.ratpoisonrc', 'ratpoisonrc'],
|
||||||
@@ -386,7 +388,7 @@ let s:filename_checks = {
|
|||||||
\ 'services': ['/etc/services'],
|
\ 'services': ['/etc/services'],
|
||||||
\ 'setserial': ['/etc/serial.conf'],
|
\ 'setserial': ['/etc/serial.conf'],
|
||||||
\ 'sh': ['/etc/udev/cdsymlinks.conf'],
|
\ 'sh': ['/etc/udev/cdsymlinks.conf'],
|
||||||
\ 'sieve': ['file.siv'],
|
\ 'sieve': ['file.siv', 'file.sieve'],
|
||||||
\ 'simula': ['file.sim'],
|
\ 'simula': ['file.sim'],
|
||||||
\ 'sinda': ['file.sin', 'file.s85'],
|
\ 'sinda': ['file.sin', 'file.s85'],
|
||||||
\ 'sisu': ['file.sst', 'file.ssm', 'file.ssi', 'file.-sst', 'file._sst', 'file.sst.meta', 'file.-sst.meta', 'file._sst.meta'],
|
\ 'sisu': ['file.sst', 'file.ssm', 'file.ssi', 'file.-sst', 'file._sst', 'file.sst.meta', 'file.-sst.meta', 'file._sst.meta'],
|
||||||
@@ -471,6 +473,7 @@ let s:filename_checks = {
|
|||||||
\ 'voscm': ['file.cm'],
|
\ 'voscm': ['file.cm'],
|
||||||
\ 'vrml': ['file.wrl'],
|
\ 'vrml': ['file.wrl'],
|
||||||
\ 'vroom': ['file.vroom'],
|
\ 'vroom': ['file.vroom'],
|
||||||
|
\ 'wast': ['file.wast', 'file.wat'],
|
||||||
\ 'webmacro': ['file.wm'],
|
\ 'webmacro': ['file.wm'],
|
||||||
\ 'wget': ['.wgetrc', 'wgetrc'],
|
\ 'wget': ['.wgetrc', 'wgetrc'],
|
||||||
\ 'winbatch': ['file.wbt'],
|
\ 'winbatch': ['file.wbt'],
|
||||||
@@ -481,7 +484,7 @@ let s:filename_checks = {
|
|||||||
\ 'xhtml': ['file.xhtml', 'file.xht'],
|
\ 'xhtml': ['file.xhtml', 'file.xht'],
|
||||||
\ 'xinetd': ['/etc/xinetd.conf'],
|
\ 'xinetd': ['/etc/xinetd.conf'],
|
||||||
\ 'xmath': ['file.msc', 'file.msf'],
|
\ 'xmath': ['file.msc', 'file.msf'],
|
||||||
\ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.ts', 'file.ui', 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul'],
|
\ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.ts', 'file.ui', 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul', 'file.wsdl'],
|
||||||
\ 'xmodmap': ['anyXmodmap'],
|
\ 'xmodmap': ['anyXmodmap'],
|
||||||
\ 'xf86conf': ['xorg.conf', 'xorg.conf-4'],
|
\ 'xf86conf': ['xorg.conf', 'xorg.conf-4'],
|
||||||
\ 'xpm2': ['file.xpm2'],
|
\ 'xpm2': ['file.xpm2'],
|
||||||
@@ -539,6 +542,43 @@ let s:script_checks = {
|
|||||||
\ 'strace': [['execve("/usr/bin/pstree", ["pstree"], 0x7ff0 /* 63 vars */) = 0'],
|
\ 'strace': [['execve("/usr/bin/pstree", ["pstree"], 0x7ff0 /* 63 vars */) = 0'],
|
||||||
\ ['15:17:47 execve("/usr/bin/pstree", ["pstree"], ... "_=/usr/bin/strace"]) = 0'],
|
\ ['15:17:47 execve("/usr/bin/pstree", ["pstree"], ... "_=/usr/bin/strace"]) = 0'],
|
||||||
\ ['__libc_start_main and something']],
|
\ ['__libc_start_main and something']],
|
||||||
|
\ 'clojure': [['#!/path/clojure']],
|
||||||
|
\ 'scala': [['#!/path/scala']],
|
||||||
|
\ 'tcsh': [['#!/path/tcsh']],
|
||||||
|
\ 'zsh': [['#!/path/zsh']],
|
||||||
|
\ 'tcl': [['#!/path/tclsh'],
|
||||||
|
\ ['#!/path/wish'],
|
||||||
|
\ ['#!/path/expectk'],
|
||||||
|
\ ['#!/path/itclsh'],
|
||||||
|
\ ['#!/path/itkwish']],
|
||||||
|
\ 'expect': [['#!/path/expect']],
|
||||||
|
\ 'gnuplot': [['#!/path/gnuplot']],
|
||||||
|
\ 'make': [['#!/path/make']],
|
||||||
|
\ 'pike': [['#!/path/pike'],
|
||||||
|
\ ['#!/path/pike0'],
|
||||||
|
\ ['#!/path/pike9']],
|
||||||
|
\ 'lua': [['#!/path/lua']],
|
||||||
|
\ 'perl6': [['#!/path/perl6']],
|
||||||
|
\ 'perl': [['#!/path/perl']],
|
||||||
|
\ 'php': [['#!/path/php']],
|
||||||
|
\ 'python': [['#!/path/python'],
|
||||||
|
\ ['#!/path/python2'],
|
||||||
|
\ ['#!/path/python3']],
|
||||||
|
\ 'groovy': [['#!/path/groovy']],
|
||||||
|
\ 'ruby': [['#!/path/ruby']],
|
||||||
|
\ 'javascript': [['#!/path/node'],
|
||||||
|
\ ['#!/path/js'],
|
||||||
|
\ ['#!/path/nodejs'],
|
||||||
|
\ ['#!/path/rhino']],
|
||||||
|
\ 'bc': [['#!/path/bc']],
|
||||||
|
\ 'sed': [['#!/path/sed']],
|
||||||
|
\ 'ocaml': [['#!/path/ocaml']],
|
||||||
|
\ 'awk': [['#!/path/awk']],
|
||||||
|
\ 'wml': [['#!/path/wml']],
|
||||||
|
\ 'scheme': [['#!/path/scheme']],
|
||||||
|
\ 'cfengine': [['#!/path/cfengine']],
|
||||||
|
\ 'erlang': [['#!/path/escript']],
|
||||||
|
\ 'haskell': [['#!/path/haskell']],
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
func Test_script_detection()
|
func Test_script_detection()
|
||||||
|
Reference in New Issue
Block a user