aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md23
1 files changed, 21 insertions, 2 deletions
diff --git a/README.md b/README.md
index 9bb0065..0222342 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,25 @@
Vim syntax highlighting for OpenGL Shading Language
+GLSL synatx highlighting is supported for:
+
+- files with extensions supported by [Khronos reference compiler](https://github.com/KhronosGroup/glslang): `.vert`, `.tesc`, `.tese`, `.geom`, `.frag`, and `.comp`
+- files with `.glsl` extension
+- HTML `<script>` tags with `type` set to `x-shader-vertex` or `x-shader-fragment`
+
+If you need support highlighting in files with other extensions (e.g. `.vs` and `.fs`) you can add it using [autocommand](http://vimdoc.sourceforge.net/htmldoc/autocmd.html#:autocmd):
+
+```viml
+" in your .vimrc (_vimrc for Windows)
+autocmd! BufNewFile,BufRead *.vs,*.fs set ft=glsl
+```
+
+or using [modeline](http://vimdoc.sourceforge.net/htmldoc/options.html#modeline) in your shader files:
+
+```glsl
+// vim: set ft=glsl:
+```
+
## Supported GLSL Versions
- OpenGL Shading Language: all versions from 1.10 to 4.50
@@ -13,7 +32,7 @@ Vim syntax highlighting for OpenGL Shading Language
Add to your `vimrc`:
-```
+```viml
Plugin 'tikhomirov/vim-glsl'
```
@@ -21,7 +40,7 @@ Then reload your `vimrc` and run `:PluginInstall`.
#### Using [Pathogen](https://github.com/tpope/vim-pathogen)
-```
+```sh
$ cd ~/.vim/bundle
$ git clone https://github.com/tikhomirov/vim-glsl
```