Giter Club home page Giter Club logo

vim-phabricator's Introduction

Phabricator Plugin for Vim

This Vim plugin provides features for interacting with Phabricator-based repositories. It builds upon the foundational git functionality provided by Fugitive.

  • Syntax highlighting for Arcanist templates and configuration files
  • :Gbrowse support for browsing Phabricator URLs from the current buffer
  • Completion support for users and projects in Arcanist diff templates using <C-X><C-O> (requires curl and a Conduit API token)

Installation

Using vim-plug

  1. Add Plug 'jparise/vim-phabricator' to ~/.vimrc
  2. vim +PluginInstall +qall

Using Vim Packages

mkdir -p ~/.vim/pack/jparise/start
cd ~/.vim/pack/jparise/start
git clone https://github.com/jparise/vim-phabricator.git phabricator
vim -u NONE -c "helptags phabricator/doc" -c q

Configuration

g:phabricator_hosts

This plugin automatically recognizes Phabricator repositories served from hosts named phabricator (eg. phabricator.example.com).

This variable lists additional hosts that should also be considered Phabricator hosts.

g:phabricator_api_token

Phabricator's Conduit API is used to generate candidates for user and project completion. These API calls require an access token which can be generated in Phabricator's per-user Settings interface. For example:

https://phabricator.example.com/settings/user/USERNAME/page/apitokens/

The plugin will first attempt to read the per-host API token from the user's ~/.arcrc configuration file. For example:

{
  "hosts": {
    "https://secure.phabricator.com/api/": {
      "token": "api-secrettokencharacters"
    }
  }
}

If an API token can not be read from the ~/.arcrc file for the current Phabricator host, the value stored in g:phabricator_api_token will be used.

License

This code is released under the terms of the MIT license. See LICENSE for details.

Similar Projects

  • arcanist.vim provides syntax highlighting for Arcanist templates and configuration files.
  • phabrowser.vim provides a Fugitive browse handler for Phabricator.
  • rhubarb.vim provides similar features for GitHub-based repositories.
  • vscode-phabricator provides similar Phabricator features for Visual Studio Code.

vim-phabricator's People

Contributors

cmhamill avatar jparise avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

cmhamill lanej

vim-phabricator's Issues

Read API token from ~/.arcrc

We should be able to read arc's existing Conduit access token from the ~/.arcrc file, if it exists. g:phabricator_api_token will remain to cover the case when ~/.arcrc is unavailable or to override the token read from ~/.arcrc.

:Gbrowse jumps to branch in local repository, not the master branch in the remote repository.

Hi, few months ago, the command jumped to the master branch in the remote repository, which was good for me since the local change/branch cannot be find in the remote repository. However, in recent days, it changes to "local branch" so I cannot check the unchanged file in remote.

Please switch it back to, or at least allow user to switch it back to remote branch. Specifically
Current jump to url:
https://phabricator.xxx.com/diffusion/O/browse/local_branch_name/path/to/file;local_object_hash

Want to jump to url:
https://phabricator.xxx.com/diffusion/O/browse/master/path/to/file

Thanks.

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.