Ⅰ. 插件描述
Vim plugin for syntax checking and highliting for OpenCL filesⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'petrushka/vim-opencl'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'petrushka/vim-opencl'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'petrushka/vim-opencl'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/petrushka/vim-opencl
Ⅳ. 文档说明
== SYNOPSIS:
Vim-opencl is a vim plugin that enables syntax highlighting and syntax checker for OpenCL (Open Computing Language) files (*.cl).
== Installation
I recommend to use Pathogen (http://www.vim.org/scripts/script.php?script_id=2332) to organize Vim plugins. In this case you should do following:
cd ~/.vim/bundle
git clone git://github.com/petRUShka/vim-opencl.git
To enable syntax checker functionality you should install following:
- Vim-plugin syntastic: https://github.com/scrooloose/syntastic
- Clcc complier: http://clcc.sourceforge.net/
== OpenCL platform support
Currently, this plugin features support for beignet, pocl, NVIDIA proprietary and AMD proprietary.
== Switching computing platforms
Some systems may have multiple computing platforms available. In that case, you can
define g:syntastic_opencl_clcc_args like this:
let g:syntastic_opencl_clcc_args = "-p 1"
where p is the platform index. You can get the platform index from running clcc -i.
With the same way, you might also enable warnings (only supported by some platforms) like this:
let g:syntastic_opencl_clcc_args = "-W"
== Authors
Originally, this was fork of http://www.vim.org/scripts/script.php?script_id=3157 with some little additions. That script provides syntax highlight for OpenCL (Open Computing Language) syntax files (*.cl).
Additionally I added other part of vim plugin such as syntax checker, autodetection file-type, load C-style indent and etc...