From a84e6f5893e65e8edc86d9500f9b9f045053a5cd Mon Sep 17 00:00:00 2001 From: Asocia Date: Sun, 29 Aug 2021 14:29:11 +0300 Subject: [PATCH] Use gc to copy git clone url --- .tridactylrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.tridactylrc b/.tridactylrc index 6f86b14..434dee6 100644 --- a/.tridactylrc +++ b/.tridactylrc @@ -166,6 +166,9 @@ bind c scrollline 5 bind e scrollline -5 bind q back 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 -bc [tabindex]:not(.two)>div,a @@ -176,6 +179,10 @@ seturl overleaf.com allowautofocus true seturl .*/.*\.ipynb 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 autocmd DocStart monkeytype.com mode ignore autocmd DocStart overleaf.com mode ignore