glsl


Ⅰ. 插件描述

Functionality for editing OpenGL Shading Language (GLSL) in Vim

Ⅱ. 基本信息

创建日期:  2015-08-05
使用用户:  1
Github星:  1
插件作者:  Brendan

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

glslVim

This is a plugin for Vim providing extensive support for editing OpenGL Shading
Language (GLSL) code. For complete documentation, install the plugin. Then, in
Vim, type :help glsl.

If you find a bug, or would like to request a feature, open an
issue.


Installation

  1. Download the vimball file.
  2. Open the vimball in Vim.
  3. Type :so %, then exit Vim.
  4. If it doesn't exist, create the file filetype.vim in your Vim runtime path.
    This is typically ~/.vim/ on Linux and C:\Users\you\vimfiles\ on

Windows.

  1. Open the filetype.vim file. Add the following lines:
augroup filetypedetect
   au BufNewFile,BufRead *.glsl setf glsl
augroup END

Provided Capabilities

Here is a summary of the functionality included in the plugin.

Syntax Highlighting

Basic syntax highlighting is provided. Most of it is analogous to C and C++
highlighting.

Automatic Indentation

GLSL uses the same automatic indentation as C.

Filetype Plugin

A filetype plugin provides most of the same functionality as the C filetype plugin.

  • Removes text wrapping in general,
  • Adds text wrapping for comments,
  • Adds autoinsertion of the comment leader after hitting <Enter> in insert mode, or 'o' or 'O' in normal mode,
  • Adds formatting of comments with the 'gq' command,
  • Adds not breaking long lines in insert mode.
  • Sets up formatting of dashed lists in comments.
  • Set the code fold method to syntax.
  • Adds a filter of ".glsl" files to the file browswer.

添加新评论