Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tikhomirov/vim-glsl
Vim runtime files for OpenGL Shading Language
https://github.com/tikhomirov/vim-glsl
glsl opengl vim vim-plugin viml webgl
Last synced: 2 months ago
JSON representation
Vim runtime files for OpenGL Shading Language
- Host: GitHub
- URL: https://github.com/tikhomirov/vim-glsl
- Owner: tikhomirov
- License: mit
- Created: 2012-07-07T09:30:43.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2024-06-15T08:14:40.000Z (7 months ago)
- Last Synced: 2024-07-31T22:52:46.238Z (5 months ago)
- Topics: glsl, opengl, vim, vim-plugin, viml, webgl
- Language: Vim Script
- Size: 56.6 KB
- Stars: 271
- Watchers: 6
- Forks: 27
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vim-glsl
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 `` 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
- OpenGL ES Shading Language: versions 1.00 and 3.00## Installation
#### Using [VimPlug](https://https://github.com/junegunn/vim-plug)
Add to your `vimrc`:
```viml
Plug 'tikhomirov/vim-glsl'
```Then reload your `vimrc` and run `:PlugInstall`.
#### Using [Vundle](https://github.com/gmarik/vundle)
Add to your `vimrc`:
```viml
Plugin 'tikhomirov/vim-glsl'
```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
```Then run `:Helptags` to generate help tags.
#### As part of [vim-polyglot](https://github.com/sheerun/vim-polyglot)
This plugin contributes to [vim-polyglot](https://github.com/sheerun/vim-polyglot) language pack. Please refer to its [installation instructions](https://github.com/sheerun/vim-polyglot#installation) for more details.
#### Manual
Copy all files to your `$HOME/.vim` (`$HOME\vimfiles\` on Windows) directory.