bazel.vim


Ⅰ. 插件描述

Vim plugin for Bazel build script support

Ⅱ. 基本信息

创建日期:  2015-10-04
使用用户:  2
Github星:  1
插件作者:  James Durand

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# Bazel.vim

Syntax highlighting for Bazel BUILD and WORKSPACE files.

This plugin does support the official skylark extensions for the following languages:

  • Closure
  • Docker
  • Groovy
  • Java App Engine
  • D
  • Rust
  • Jsonnet
  • Scala

Installation

Pathogen

If you're using Pathogen follow the
following instructions.

cd ~/.vim/bundle && \
git clone https://github.com/durandj/bazel.vim.git

Vundle

If you're using Vundle then all you
have to do is add the following to your ~/.vimrc file.

Plugin 'durandj/bazel.vim'

Old School/Classic Plugin Management

If you're "hardcore" and you don't use any plugin manager for your Vim
environment then you will need to do the following.

  1. Download/Clone/Checkout the source
  2. Copy the contents of bazel.vim/ftdetect to ~/.vim/ftdetect
  3. Copy the contents of bazel.vim/ftplugin to ~/.vim/ftplugin
  4. Copy the contents of bazel.vim/syntax to ~/.vim/syntax

Alternatives

It is worth noting that there is an alternative plugin to this one. davidzchen
wrote vim-bazel which works fine
but I decided to make my own version because I didn't like how his plugin did
not highlight the arguments to the standard build rules. While this is a small
thing I really like having a visual confirmation that I'm writing the right
thing and that there's not a typo that I'm going to find when I try to build.

The bazel.vim plugin also supports the official Skylark extensions which
the vim-bazel plugin does not at present.

TODO

  1. Split up support for the build rules based on if a WORKSPACE or a BUILD file is being edited

添加新评论