This Vim plugin provides features for interacting with some sourcehut services. I wrote about why I created this plugin here.
#Usage
In doubt, run :help srht.
This plugin provides the following features per service:
git.sr.ht:- if vim-fugitive is
installed, this plugin will allow
:GBrowseto open sourcehut URLs
- if vim-fugitive is
installed, this plugin will allow
paste.sr.ht:- create and retrieve pastes with
:SrhtPaste [sha](requirescurland the webapi-vim plugin)
- create and retrieve pastes with
#Configuration
g:srht_token_file: path to the file containing a sourcehut personal access token (which is only required for commands that interact with the sourcehut APIs)- default:
~/.srht-vim
- default:
g:srht_paste_default_visibility: default paste visibility- default:
unlisted
- default:
g:srht_paste_domain: domain of the paste hosting service- default:
paste.sr.ht
- default:
g:srht_git_domain: domain of the git hosting service- default:
git.sr.ht
- default:
#Installation
Install the srht.vim plugin using your favorite package manager, or use Vim's built-in package support:
$ mkdir -p ~/.vim/pack/willdurand/start
$ cd !$
$ git clone https://git.sr.ht/~willdurand/srht.vim
$ vim -u NONE -c "helptags srht.vim/doc" -c q
#Contributing
Send patches to my public inbox
(please edit the [PATCH] line to include srht.vim: [PATCH srht.vim]).
The :SrhtPaste feature is heavily inspired by the excellent
vim-gist written by Yasuhiro Matsumoto and
released under the BSD License (2-clause).
#License
srht.vim is released under the MIT License. See the bundled LICENSE file for details.