Skip to content

beyondmarc/glsl.vim

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

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.

About

OpenGL Shading Language (GLSL) Vim syntax highlighting

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published