Permalink
Browse files

Adding automatic syntax highlighting

  • Loading branch information...
1 parent 8874e25 commit bfcdddbb51885a0fa4123b9fe20e1397912af09c @baphled committed Feb 14, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 bindings.vim
View
@@ -59,6 +59,18 @@ vmap <C-Up> [egv
vmap <C-Down> ]egv
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" Automatically set syntax
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+if did_filetype() " filetype already set..
+ finish " ..don't do these checks
+endif
+if getline(1) =~ '^#!.*\<mine\>'
+ setfiletype mine
+elseif getline(1) =~? '\<drawing\>'
+ setfiletype drawing
+endif
+
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Running tests
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

0 comments on commit bfcdddb

Please sign in to comment.