vim-goyacc


Ⅰ. 插件描述

Vim filetype support for goyacc

Ⅱ. 基本信息

创建日期:  2017-05-12
使用用户:  1
Github星:  19
插件作者:  Linda_pp

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Vim Filetype Support for [goyacc][]

[vim-goyacc][] is a filetype support for [goyacc][].

It provides standard YACC syntax highlight
and Go syntax highlight inside semantic action {...}. Default YACC syntax highlight attempts
to highlight the semantic action as C or C++, though.

And this also provides Go's indentation using runtime/indent/go.vim. It provides more
pleasant auto indentation as editing Go source.

![screen shot][]

Files whose names end with .go.y are detected as a file for goyacc. If you want to detect files
with your own rule, please write your autocmd in your vimrc.

e.g.

" All files end with .y are detected as goyacc parser definition file.
autocmd BufNewFile,BufReadPost *.y setlocal filetype=goyacc

Or write mode line at the bottom of your file as below.

/* vim: set ft=goyacc: */

How to Install

If you use Vim's default package management, please refer :help load-plugins. Clone this
repository with git to proper location in your filesystem.

If you use your favorite Vim plugin manager like [vim-plug][], please follow the instruction
in its documentation.

License

This plugin was derived from Vim's standard YACC filetype support. Hence this plugin is
provided with the same license as Vim (Vim license). Please see :help license in Vim for
more detail.

添加新评论