vimrc: Add CopyGitURLToLineOrRange mapping
This commit is contained in:
parent
575c216529
commit
bc51900e59
10
vimrc
10
vimrc
|
@ -246,6 +246,16 @@ xmap ah <Plug>(GitGutterTextObjectOuterVisual)
|
|||
" vim-fugitive
|
||||
packadd! vim-fugitive " https://github.com/tpope/vim-fugitive.git
|
||||
|
||||
" Copy Git permalink to clipboard for either current line or range
|
||||
function! CopyGitURLToLineOrRange() range
|
||||
if a:firstline == a:lastline
|
||||
execute ".GBrowse!"
|
||||
else
|
||||
execute a:firstline . "," . a:lastline . "GBrowse!"
|
||||
endif
|
||||
endfunction
|
||||
map <leader>u :call CopyGitURLToLineOrRange()<cr>
|
||||
|
||||
" vim-go
|
||||
" Doesn't work in after/ftplugin/go.vim:
|
||||
let g:go_def_mapping_enabled = 0
|
||||
|
|
Loading…
Reference in New Issue