Permalink
Browse files

githublink has been pulled to fugitive

  • Loading branch information...
1 parent b599d69 commit 3b9aabaebf9e930d61d2238f0ae5629515d69a56 @tenderlove committed May 5, 2011
Showing with 0 additions and 14 deletions.
  1. +0 −14 plugin/githublink.vim
View
@@ -1,14 +0,0 @@
-function! GithubLink() range
- let l:giturl = system('git config remote.origin.url')
- let l:prefix = substitute(system('git rev-parse --show-prefix'), "\n", '', '')
- let l:repo = get(split(matchstr(l:giturl, '\w*\/\w*\.git'), '\.'), 0)
- let l:url = 'http://github.com/' . l:repo
- let l:branch = get(split(substitute(system('git symbolic-ref HEAD'), "\n", '', '') , '/'), -1)
- let l:filename = l:prefix . @%
-
- let l:full = join([l:url, 'blob', l:branch, l:filename], '/')
-
- let @* = l:full . '#L' . a:firstline . '-' . a:lastline
-endfunction
-
-vnoremap <silent> <Leader>gh :call GithubLink()<CR>

0 comments on commit 3b9aaba

Please sign in to comment.