Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding automatic syntax highlighting

  • Loading branch information...
commit bfcdddbb51885a0fa4123b9fe20e1397912af09c 1 parent 8874e25
@baphled authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 bindings.vim
View
12 bindings.vim
@@ -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
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Please sign in to comment.
Something went wrong with that request. Please try again.