GithubHelp home page GithubHelp logo

vazel's Introduction

Vazel: Bazel + Vim + tmux

Vazel is a plugin geared towards a Bazel-Vim-tmux setup, so it might not be for everyone. In fact, I built it for my own particular workflow.

In tmux I normally have one window dedicated to development. This window has two panes in a horizontal split. The top pane runs Vim and the bottom pane is a terminal for running Bazel commands, among other miscellaneous shell commands. (See diagram below.)

+--------------------------------+ 
|                                | 
|                                | 
|                                | 
|          <Vim pane>            | 
|                                | 
|                                | 
|                                | 
+--------------------------------+ 
|                                | 
|       <Terminal pane>          |
|                                | 
+--------------------------------+ 

The main feature of Vazel is sending bazel build and bazel test commands to the terminal pane. For example, let's say I am editing the file ~/myproject/src/main/scala/com/foo/bar/Bar.scala. And lets say this file is part of the //myproject/src/main/scala/com/foo package. Then if I run the Vazel plugin command VazelBuild, then the command bazel build //myproject/src/main/scala/com/foo will start running in the terminal pane.

Commands

  • :VazelBuild [target_name] [-- [bazel_options]] Constructs a Bazel command of the form below and sends it to the terminal window.

    bazel build [bazel_options] //<files_current_package>[:<target_name>] 
    
  • :VazelRun [target_name] [-- [bazel_options]] Constructs a Bazel command of the form below and sends it to the terminal window.

    bazel run [bazel_options] //<files_current_package>[:<target_name>] 
    
  • :VazelTest [target_name] [-- [bazel_options]] Constructs a Bazel command of the form below and sends it to the terminal window.

    bazel test [bazel_options] //<files_current_package>[:<target_name>] 
    
  • :VazelSpBUILD Opens the BUILD (or BUILD.bazel) for the current file's package in a horizontal split.

  • :VazelVsBUILD Opens the BUILD (or BUILD.bazel) for the current file's package in a vertical split.

vazel's People

Contributors

lewistg avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.