Use gc to copy git clone url

This commit is contained in:
Asocia 2021-08-29 14:29:11 +03:00
parent acd3c640b9
commit a84e6f5893

View File

@ -166,6 +166,9 @@ bind c scrollline 5
bind e scrollline -5 bind e scrollline -5
bind q back bind q back
bind Q forward bind Q forward
bind gc composite git_clone | clipboard yank
bind gC composite git_clone_ssh | clipboard yank
bind yr composite js "\"" + document.location.href.split('#')[0].split('/').slice(3, 5).join('/') + "\"" | clipboard yank
bindurl ^https://web.whatsapp.com f hint -c [tabindex]:not(.two)>div,a bindurl ^https://web.whatsapp.com f hint -c [tabindex]:not(.two)>div,a
bindurl ^https://web.whatsapp.com F hint -bc [tabindex]:not(.two)>div,a bindurl ^https://web.whatsapp.com F hint -bc [tabindex]:not(.two)>div,a
@ -176,6 +179,10 @@ seturl overleaf.com allowautofocus true
seturl .*/.*\.ipynb allowautofocus true seturl .*/.*\.ipynb allowautofocus true
seturl nitrotype.com allowautofocus true seturl nitrotype.com allowautofocus true
" Aliases
alias git_clone js "git clone " + document.location.href.split('#')[0].split('/').slice(0, 5).join('/') + " ;cd " + document.location.href.split('#')[0].split('/').at(4)
alias git_clone_ssh js "git clone " + document.location.href.split('#')[0].split('/').slice(0, 5).join('/').replace(/https?:\/\//,"git@").replace("/",":").replace(/$/,".git") + " ;cd " + document.location.href.split('#')[0].split('/').at(4)
" Autocmds " Autocmds
autocmd DocStart monkeytype.com mode ignore autocmd DocStart monkeytype.com mode ignore
autocmd DocStart overleaf.com mode ignore autocmd DocStart overleaf.com mode ignore