GitHub - tonchis/vim-to-github: Will take you from Vim to GitHub
source link: https://github.com/tonchis/vim-to-github
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
vim-to-github
Taking you from Vim to GitHub.
:ToGithub
Will fire up the browser, opening the file and LOC of the current buffer in GitHub.
Visual mode is supported!
:'<,'>ToGithub
ToGithub
makes up the url from the origin fetch url in your $ git remote -v
.
If you need to hit another username do:
:ToGithub username
It's the same to replace the repo name:
:ToGithub username repo
You can also set a global option to copy the url in the clipboard instead of opening the browser
let g:to_github_clip_command = 'pbcopy'
let g:to_github_clipboard = 1
Installation
Pathogen will do
$ cd ~/.vim/bundle $ git clone https://github.com/tonchis/vim-to-github.git
Or just good old copy and paste.
Caveats
:ToGithub
will give you a link to a specific commit. If you work and commit but don't push to GitHub, you will see a 404.
Thanks
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK