Ⅰ. 插件描述
Vim runtime files for OpenGL Shading LanguageⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'tikhomirov/vim-glsl'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'tikhomirov/vim-glsl'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'tikhomirov/vim-glsl'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/tikhomirov/vim-glsl
Ⅳ. 文档说明
# vim-glsl
Vim syntax highlighting for OpenGL Shading Language
GLSL synatx highlighting is supported for:
- files with extensions supported by Khronos reference compiler:
.vert,.tesc,.tese,.geom,.frag, and.comp - files with
.glslextension - HTML
<script>tags withtypeset tox-shader-vertexorx-shader-fragment
If you need support highlighting in files with other extensions (e.g. .vs and .fs) you can add it using autocommand:
" in your .vimrc (_vimrc for Windows)
autocmd! BufNewFile,BufRead *.vs,*.fs set ft=glslor using modeline in your shader files:
// 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 Vundle
Add to your vimrc:
Plugin 'tikhomirov/vim-glsl'Then reload your vimrc and run :PluginInstall.
Using Pathogen
$ cd ~/.vim/bundle
$ git clone https://github.com/tikhomirov/vim-glslThen run :Helptags to generate help tags.
As part of vim-polyglot
This plugin contributes to vim-polyglot language pack. Please refer to its installation instructions for more details.
Manual
Copy all files to your $HOME/.vim ($HOME\vimfiles\ on Windows) directory.