vim-spirv


Ⅰ. 插件描述

A vim plugin for the Khronos Group's SPIR-V standard.

Ⅱ. 基本信息

创建日期:  2016-05-04
使用用户:  6
Github星:  16
插件作者:  Kenneth Benzie

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vim-spirv

A vim plugin for the Khronos Group's SPIR-V standard providing
rich syntax highlighting for disassembled SPIR-V assembly (.spvasm
files) and automatically disassembled binary SPIR-V modules (.spv
files) with interactive visualisation of the ID under the cursor to show, at a
glance, the source of opcode operands.

<p align="center">vim-spirv</p>

This plugin does not target the older LLVM IR based [SPIR
1.2][spir] and 2.0 specifications.

Install

Using vim-plug.

Plug 'kbenzie/vim-spirv'

Using Vundle.

Plugin 'kbenzie/vim-spirv'

Using vim-pathogen.

git clone https://github.com/kbenzie/vim-spirv.git ~/.vim/bundle/vim-spirv

Options

g:spirv_enable_current_id

Enable automatic highlighting of all occurrences of the ID under the cursor.
This is useful for highlighting where an opcode ID is defined and used at a

  1. See g:spirv_current_id_highlight. To disable this option.
let g:spirv_enable_current_id = 0

g:spirv_current_id_highlight

Specify the value of the SpirvCurrentID highlight group, this is only set when
the g:spirv_enable_current_id option is

  1. To Customize the highlight group to, for example, make the current ID
    bold.
let g:spirv_current_id_highlight = 'term=bold cterm=bold gui=bold'

g:spirv_enable_extinst_error

Enable highlighting extended instruction error highlighting, enabling this
option will parse the file looking for an OpExtInstImport instruction,
determine the imported instruction set and set the value of that instruction
sets highlight group, E.G. SpirvGlslStd450, to linked to the
SpirvInstruction highlight group. If no OpExtInstImport instruction is
found, or it is commented out, the extended instruction set highlight group
will be linked to SpirvError. When this option is disabled the extended
instruction set highlight group is set to SpirvInstruction. To disable this
option.

let g:spirv_enable_extinst_error = 0

g:spirv_enable_autodisassemble

Enable automatic disassembly of SPIR-V binary files on :edit and automatic
assembly on :write enabling ease of editing. This option depends on
spirv-as and spirv-dis being available on the
system PATH, to override this behavior see
g:spirv_as_path and g:spirv_dis_path.
To disable this option.

let g:spirv_enable_autoassemble = 1

g:spirv_as_path

Path to the spirv-as tool used automatically assemble SPIR-V assembly into a
binary when g:spirv_enable_autodisassemble
is enabled. If spirv-as is on the system PATH this option
need not be set. Default setting.

let g:spirv_as_path = 'spirv-as'

g:spirv_dis_path

Path to the spirv-dis tool used automatically disassemble SPIR-V assembly into
a binary when g:spirv_enable_autodisassemble
is enabled. If spirv-dis is on the system PATH this option
need not be set. Default setting.

let g:spirv_dis_path = 'spirv-dis'

License (MIT)

See license file.

添加新评论