bazel.vim - Bazel build system integration for Vim
- Tab autocompletion for targets
- goto-definition for BUILD files
- listing references
and more.
Feature | bazel.vim | official vim-bazel |
---|---|---|
Zero dependency | ✓ | ✗(requires Bash completion + vim-maktaba) |
Tab completion | ✓ | ✓ |
Integration with Vim terminal | ✓ | ✓(does not reuse terminal window) |
Build results in QuickFix | ✓ | ✗ |
Go to BUILD file |
✓ | ✗ |
Go to label/target definition | ✓ | ✗ |
List references | ✓ | ✗ |
gb
- Go toBUILD
file corresponding to the current buffer.gd
- Go to label definition under cursor (forBUILD
and.bzl
files).gr
- List references for label under cursor (forBUILD
and.bzl
files).<leader>p
- Print label that corresponds to current buffer.b<C-G>
- Print current buffer path relative to workspace.
Bazel {args}
- Run Bazel command and open QuickFix when done.
Example:
:Bazel build //main:hello-world
BazelDefinition {target}
- Jump to target definition.
Example:
:BazelDefinition //main:hello-world
BazelReferences {target}
- List target references.
Example:
:BazelReferences //lib:hello-time