diff options
| author | Sergey Tikhomirov <sergey@tikhomirov.io> | 2017-07-03 20:55:03 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-03 20:55:03 +0300 |
| commit | e19a63bdda6dd5fcdd1e724e17321b3a1bce4059 (patch) | |
| tree | 8e997c2954c468690f716132e1cd7d5597182deb | |
| parent | 3e1bd99e7f0199f091ddd815b31ad53e46aa740c (diff) | |
| download | vim-glsl-e19a63bdda6dd5fcdd1e724e17321b3a1bce4059.tar.gz vim-glsl-e19a63bdda6dd5fcdd1e724e17321b3a1bce4059.zip | |
Add information about supported file extensions
| -rw-r--r-- | README.md | 23 |
1 files changed, 21 insertions, 2 deletions
@@ -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 ``` |
