From a71a180df9c3be88a033dcaee6b64c20b66d446a Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 18 Sep 2018 21:18:55 -0400 Subject: vim-patch:8.0.1457: clojure now supports a shebang line Problem: Clojure now supports a shebang line. Solution: Detect clojure script from the shebang line. (David Burgin, closes vim/vim#2570) https://github.com/vim/vim/commit/8fd2ffc530f8f01afac53903e6ff95867afd94d7 --- runtime/scripts.vim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'runtime/scripts.vim') diff --git a/runtime/scripts.vim b/runtime/scripts.vim index 18263e2842..3279b58a47 100644 --- a/runtime/scripts.vim +++ b/runtime/scripts.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types in scripts " " Maintainer: Bram Moolenaar -" Last change: 2017 Nov 11 +" Last change: 2018 Feb 03 " 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 @@ -100,6 +100,10 @@ if s:line1 =~# "^#!" elseif s:name =~# 'make\>' set ft=make + " Pike + elseif s:name =~# '^pike\%(\>\|[0-9]\)' + set ft=pike + " Lua elseif s:name =~# 'lua' set ft=lua @@ -172,6 +176,10 @@ if s:line1 =~# "^#!" elseif s:name =~# 'scala\>' set ft=scala + " Clojure + elseif s:name =~# 'clojure' + set ft=clojure + endif unlet s:name -- cgit From f1f036740a89d7bece1fa7754bfeaad51220e5c7 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 18 Sep 2018 21:20:51 -0400 Subject: vim-patch:8.0.1465: python2 and python3 detection not tested Problem: Python2 and python3 detection not tested. (Matej Cepl) Solution: Add test for detecting python2 and python3. Also detect a script using "js" as javascript. https://github.com/vim/vim/commit/4bc0bed53695ac67db8d601f2a15e48e7a196688 --- runtime/scripts.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/scripts.vim') diff --git a/runtime/scripts.vim b/runtime/scripts.vim index 3279b58a47..ab66c0c0a1 100644 --- a/runtime/scripts.vim +++ b/runtime/scripts.vim @@ -133,7 +133,7 @@ if s:line1 =~# "^#!" set ft=ruby " JavaScript - elseif s:name =~# 'node\(js\)\=\>' || s:name =~# 'rhino\>' + elseif s:name =~# 'node\(js\)\=\>\|js\>' || s:name =~# 'rhino\>' set ft=javascript " BC calculator -- cgit