How to get syntax highlighting for GLSL in Vim

GLSL shaders are typically written in standalone files. To get syntax highlighting for these files in Vim:

  • Make sure that the file has one of these extensions: .glsl, .vert, .frag, .geom, .vs or .fs.

  • Install the Vim-GLSL plugin:

$ cd ~/.vim/bundle
$ git clone https://github.com/tikhomirov/vim-glsl.git

Tried with: Vim 7.4 and Ubuntu 14.04

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s