X-Git-Url: http://git.draconx.ca/gitweb/vimconf.git/blobdiff_plain/c92c553c3dfa40a8b1fc7cdfab4f2bfd2807496b..3b4da6b830a51d8b3aea3f0ae997f07e69b99e67:/ftplugin/glsl.vim diff --git a/ftplugin/glsl.vim b/ftplugin/glsl.vim new file mode 100644 index 0000000..04022de --- /dev/null +++ b/ftplugin/glsl.vim @@ -0,0 +1,13 @@ +" TODO: #version appears exactly once in the file, before any non-whitespace +" (i.e. possibly after a length comment). Checking only the first 10 lines +" is an incorrect hack. +for item in getline(1,10) + if item =~ "#version 400" + execute ':set syntax=glsl400' + break + endif + if item =~ "#version 330" + execute ':set syntax=glsl330' + break + endif +endfor