Permalink
Browse files

That's not a crossroads, that's a T-junction.

  • Loading branch information...
0 parents commit 3a7d48a9c69e09ab5becf6ceab4ecc2f9851568f @moll committed Jul 28, 2013
Showing with 31 additions and 0 deletions.
  1. +20 −0 LICENSE
  2. +8 −0 ftdetect/node.vim
  3. +1 −0 test/ftdetect/shebang-usr-bin
  4. +1 −0 test/ftdetect/shebang-usr-env
  5. +1 −0 test/ftdetect/shebang-usr-local-bin
@@ -0,0 +1,20 @@
+Node for Vim
+Copyright (C) 2013 Andri Möll
+
+This program is free software: you can redistribute it and/or modify it under
+the terms of the GNU Affero General Public License as published by the Free
+Software Foundation, either version 3 of the License, or any later version.
+
+Additional permission under the GNU Affero GPL version 3 section 7:
+If you modify this Program, or any covered work, by linking or
+combining it with other code, such other code is not for that reason
+alone subject to any of the requirements of the GNU Affero GPL version 3.
+
+In summary:
+- You can use this program for no cost.
+- You can use this program for both personal and commercial reasons.
+- You do not have to share your own program's code which uses this program.
+- You have to share modifications (e.g bug-fixes) you've made to this program.
+
+For the full copy of the GNU Affero General Public License see:
+http://www.gnu.org/licenses.
@@ -0,0 +1,8 @@
+function! s:isNode()
+ let shebang = getline(1)
+ if shebang =~# '^#!.*/bin/env\s\+node\>' | return 1 | en
+ if shebang =~# '^#!.*/bin/node\>' | return 1 | en
+ return 0
+endfunction
+
+au BufRead,BufNewFile * if !did_filetype() && s:isNode() | setf javascript | en
@@ -0,0 +1 @@
+#!/usr/bin/node
@@ -0,0 +1 @@
+#!/usr/bin/env node
@@ -0,0 +1 @@
+#!/usr/local/bin/node

0 comments on commit 3a7d48a

Please sign in to comment.