是否有人知道Vim的插件允许我在Github上打开当前文件(或者理想情况下,即使是在可视模式下的当前选择)?
我之前有Sublime Text的插件,现在我正在使用Vim,想拥有相同的东西.
编辑:我正在寻找一个插件,它将打开我的网页浏览器到github.com上与我正在编辑的文件对应的页面.例如,如果我在Vim的foo/bar.js本地克隆版本中进行编辑,quux则会打开使用此插件https://github.com/dtb/Quux/blob/master/foo/bar.js.这相当于ST2-Githubinator.
该fugitive.vim插件有:help fugitive-:Gbrowse会做你想要什么.一般来说它也很棒.
*fugitive-:Gbrowse*
:[range]Gbrowse If the remote for the current branch is on GitHub,
open the current file, blob, tree, commit, or tag
(with git-web--browse) on GitHub. Otherwise, open the
current file, blob, tree, commit, or tag in
git-instaweb (if you have issues, verify you can run
"git instaweb" from a terminal). If a range is given,
it is appropriately appended to the URL as an anchor.
To use with GitHub FI, point g:fugitive_github_domains
at a list of domains:
let g:fugitive_github_domains = ['git.example.com']
:[range]Gbrowse! Like :Gbrowse, but put the URL on the clipboard rather
than opening it.
Run Code Online (Sandbox Code Playgroud)