Skip to content

Commit

Permalink
feat: Added mappings to copy the link to the line of a Git repository…
Browse files Browse the repository at this point in the history
… to the clipboard

This is super useful when sharing a reference with another developer,
e.g., to a function.
  • Loading branch information
amix committed Oct 11, 2021
1 parent d93dda4 commit e493242
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,11 @@ Open [ctrlp.vim](https://github.com/kien/ctrlp.vim) plugin to quickly find a fil
:IndentGuidesDisable
:IndentGuidesToggle

[vim-fugitive](https://github.com/tpope/vim-fugitive) to copy the link to the line of a Git repository to the clipboard:

nnoremap <leader>v :.GBrowse!<CR>
xnoremap <leader>v :'<'>GBrowse!<CR>


### Spell checking
Pressing `<leader>ss` will toggle spell checking:
Expand Down
1 change: 1 addition & 0 deletions update_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
vim-expand-region https://github.com/terryma/vim-expand-region
vim-multiple-cursors https://github.com/terryma/vim-multiple-cursors
vim-fugitive https://github.com/tpope/vim-fugitive
vim-rhubarb https://github.com/tpope/vim-rhubarb
goyo.vim https://github.com/junegunn/goyo.vim
vim-zenroom2 https://github.com/amix/vim-zenroom2
vim-repeat https://github.com/tpope/vim-repeat
Expand Down
8 changes: 8 additions & 0 deletions vimrcs/plugins_config.vim
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,11 @@ nnoremap <silent> <leader>d :GitGutterToggle<cr>
" => EditorConfig (project-specific EditorConfig rule)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:EditorConfig_exclude_patterns = ['fugitive://.*']


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Fugitive
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Copy the link to the line of a Git repository to the clipboard
nnoremap <leader>v :.GBrowse!<CR>
xnoremap <leader>v :'<'>GBrowse!<CR>

0 comments on commit e493242

Please sign in to comment.