glsl.vim


Ⅰ. 插件描述

OpenGL Shading Language (GLSL) Vim syntax highlighting

Ⅱ. 基本信息

创建日期:  2012-11-17
使用用户:  42
Github星:  31
插件作者:  beyondmarc

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'beyondmarc/glsl-vim-holy-ground'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'beyondmarc/glsl-vim-holy-ground'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'beyondmarc/glsl-vim-holy-ground'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/beyondmarc/glsl.vim

Ⅳ. 文档说明

# glsl.vim

OpenGL Shading Language (GLSL) Vim syntax highlighting.

Instructions

Using the Pathogen plugin:

  • From your ~/.vim directory:

git submodule add https://github.com/beyondmarc/glsl.vim.git bundle/glsl.vim

If not using the Pathogen plugin:

  • Add this directory to your runtimepath, in your .vimrc:

set rtp^=/path/to/glsl.vim

Choosing the GLSL version to work with

The plugin will try to automatically detect which version to use by looking for
the text #version XXX in the 30 first lines of the file.

If the version of the file can't be determined, the default version will be used.

To set the default GLSL version for which the syntax is loaded, set the global
variable glsl_default_version in your .vimrc before loading the plugin:

let g:glsl_default_version = 'glsl330'

If this variable is not set, it will default to glsl330.

Choosing which file extensions to interpret as GLSL files

To set the list of file extensions for which the syntax is loaded, set the
global variable glsl_file_extensions in your .vimrc before loading the plugin:

let g:glsl_file_extensions = '*.glsl,*.vsh,*.fsh,*.vert,*.tesc,*.tese,*.geom,*.frag,*.comp'

If this variable is not set, it will default to *.glsl,*.vsh,*.fsh,*.vert,*.tesc,*.tese,*.geom,*.frag,*.comp.

添加新评论