diff 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
line wrap: on
line diff
--- a/runtime/scripts.vim
+++ b/runtime/scripts.vim
@@ -1,7 +1,7 @@
 " Vim support file to detect file types in scripts
 "
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last change:	2016 May 21
+" Last change:	2017 Mar 04
 
 " 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
@@ -124,6 +124,10 @@ if s:line1 =~ "^#!"
   elseif s:name =~ 'ruby'
     set ft=ruby
 
+    " JavaScript
+  elseif s:name =~ 'node\(js\)\=\>' || s:name =~ 'rhino\>'
+    set ft=javascript
+
     " BC calculator
   elseif s:name =~ '^bc\>'
     set ft=bc
@@ -156,6 +160,14 @@ if s:line1 =~ "^#!"
   elseif s:name =~ 'escript'
     set ft=erlang
 
+    " Haskell
+  elseif s:name =~ 'haskell'
+    set ft=haskell
+
+    " Scala
+  elseif s:name =~ 'scala\>'
+    set ft=scala
+
   endif
   unlet s:name