Skip to content

rhubarb-gogs.vim: Gogs extension for fugitive.vim

Notifications You must be signed in to change notification settings

l-qing/vim-rhubarb-gogs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rhubarb_gogs.vim

If fugitive.vim is the Git, rhubarb_gogs.vim is the Hub. Here's the full list of features:

  • Enables :Gbrowse from fugitive.vim to open Gogs URLs.

  • Sets up :Git to use hub if installed rather than git.

  • In commit messages, Gogs issues, issue URLs, and collaborators can be omni-completed (<C-X><C-O>, see :help compl-omni). This makes inserting those Closes #123 remarks slightly easier than copying and pasting from the browser.

Installation

If you don't have a preferred installation method, I recommend installing pathogen.vim, and then simply copy and paste:

cd ~/.vim/bundle
git clone https://github.com/tpope/vim-rhubarb_gogs.git
vim -u NONE -c "helptags vim-rhubarb_gogs/doc" -c q

You'll also need fugitive.vim.

Curl (included with macOS) is required for features that use the GitHub API (i.e., :Gbrowse doesn't need it). Generate a personal access token with repo permissions and add it to your .netrc:

echo 'machine api.github.com login <user> password <token>' >> ~/.netrc

If you are using Gogs Enterprise, repeat this step for each domain (omit the api. portion). You'll also need to tell rhubarb_gogs the root URLs:

let g:gogs_enterprise_urls = ['https://example.com']

FAQ

How do I turn off that preview window that shows the issue body?

set completeopt-=preview

Self-Promotion

Like rhubarb_gogs.vim? Follow the repository on GitHub. And if you're feeling especially charitable, follow tpope on Twitter and GitHub.

License

Copyright (c) Tim Pope. Distributed under the same terms as Vim itself. See :help license.

About

rhubarb-gogs.vim: Gogs extension for fugitive.vim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 100.0%