comparison runtime/scripts.vim @ 13166:b009ab2c1a8f v8.0.1457

patch 8.0.1457: clojure now supports a shebang line commit https://github.com/vim/vim/commit/8fd2ffc530f8f01afac53903e6ff95867afd94d7 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 3 15:43:15 2018 +0100 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 #2570)
author Christian Brabandt <cb@256bit.org>
date Sat, 03 Feb 2018 15:45:05 +0100
parents 371ceeebbdaa
children 181ddaf5e467
comparison
equal deleted inserted replaced
13165:3d233468319a 13166:b009ab2c1a8f
1 " Vim support file to detect file types in scripts 1 " Vim support file to detect file types in scripts
2 " 2 "
3 " Maintainer: Bram Moolenaar <Bram@vim.org> 3 " Maintainer: Bram Moolenaar <Bram@vim.org>
4 " Last change: 2017 Nov 11 4 " Last change: 2018 Feb 03
5 5
6 " This file is called by an autocommand for every file that has just been 6 " This file is called by an autocommand for every file that has just been
7 " loaded into a buffer. It checks if the type of file can be recognized by 7 " loaded into a buffer. It checks if the type of file can be recognized by
8 " the file contents. The autocommand is in $VIMRUNTIME/filetype.vim. 8 " the file contents. The autocommand is in $VIMRUNTIME/filetype.vim.
9 " 9 "
102 102
103 " Pike 103 " Pike
104 elseif s:name =~# '^pike\%(\>\|[0-9]\)' 104 elseif s:name =~# '^pike\%(\>\|[0-9]\)'
105 set ft=pike 105 set ft=pike
106 106
107 " Pike
108 elseif s:name =~# '^pike\%(\>\|[0-9]\)'
109 set ft=pike
110
107 " Lua 111 " Lua
108 elseif s:name =~# 'lua' 112 elseif s:name =~# 'lua'
109 set ft=lua 113 set ft=lua
110 114
111 " Perl 6 115 " Perl 6
173 set ft=haskell 177 set ft=haskell
174 178
175 " Scala 179 " Scala
176 elseif s:name =~# 'scala\>' 180 elseif s:name =~# 'scala\>'
177 set ft=scala 181 set ft=scala
182
183 " Clojure
184 elseif s:name =~# 'clojure'
185 set ft=clojure
178 186
179 endif 187 endif
180 unlet s:name 188 unlet s:name
181 189
182 else 190 else