Mercurial > vim
comparison runtime/scripts.vim @ 11062:1218c5353e2b
Runtime file updates.
commit https://github.com/vim/vim/commit/214641f77df6f318a4b3a0b09723c19859a103f4
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 5 17:04:09 2017 +0100
Runtime file updates.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 05 Mar 2017 17:15:05 +0100 |
parents | bc38030aec7d |
children | a58229e3aff6 |
comparison
equal
deleted
inserted
replaced
11061:0f11b92d7f5e | 11062:1218c5353e2b |
---|---|
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: 2016 May 21 | 4 " Last change: 2017 Mar 04 |
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 |
122 | 122 |
123 " Ruby | 123 " Ruby |
124 elseif s:name =~ 'ruby' | 124 elseif s:name =~ 'ruby' |
125 set ft=ruby | 125 set ft=ruby |
126 | 126 |
127 " JavaScript | |
128 elseif s:name =~ 'node\(js\)\=\>' || s:name =~ 'rhino\>' | |
129 set ft=javascript | |
130 | |
127 " BC calculator | 131 " BC calculator |
128 elseif s:name =~ '^bc\>' | 132 elseif s:name =~ '^bc\>' |
129 set ft=bc | 133 set ft=bc |
130 | 134 |
131 " sed | 135 " sed |
153 set ft=cfengine | 157 set ft=cfengine |
154 | 158 |
155 " Erlang scripts | 159 " Erlang scripts |
156 elseif s:name =~ 'escript' | 160 elseif s:name =~ 'escript' |
157 set ft=erlang | 161 set ft=erlang |
162 | |
163 " Haskell | |
164 elseif s:name =~ 'haskell' | |
165 set ft=haskell | |
166 | |
167 " Scala | |
168 elseif s:name =~ 'scala\>' | |
169 set ft=scala | |
158 | 170 |
159 endif | 171 endif |
160 unlet s:name | 172 unlet s:name |
161 | 173 |
162 else | 174 else |