Skip to content

Instantly share code, notes, and snippets.

@ilya-bystrov
Last active April 18, 2024 00:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ilya-bystrov/0d7c0c5b17a269c30e745475aa8e8c76 to your computer and use it in GitHub Desktop.
Save ilya-bystrov/0d7c0c5b17a269c30e745475aa8e8c76 to your computer and use it in GitHub Desktop.
cVimrc
let langmap = "Ё|АFБ<ВDГUДLЕTЖ:ЗPИBЙQКRЛKМVНYОJПGРHСCТNУEФAХ{ЦWЧXШIЩOЪ}ЫSЬMЭ\"Ю>ЯZаfб\\,вdгuдlеtж\\;зpиbйqкrлkмvнyоjпgрhсcтnуeфaх[цwчxшiщoъ]ыsьmэ'ю.яzё\\№#"
let hintcharacters="asdfqwerjkluiop"
let blacklists = ["https://www.twitch.tv/*", "http://localhost*"]
getIP() -> {{
httpRequest({url: 'http://api.ipify.org/?format=json', json: true},
function(res) { Status.setMessage('IP: ' + res.ip); });
}}
map yi :call getIP<CR>
getTitle() -> {{
var text = document.title
Clipboard.copy(text);
Status.setMessage(text);
}}
map yt :call getTitle<CR>
getRstLink() -> {{
var text = "`" + document.title + " <" + window.location.href + ">`_"
Clipboard.copy(text);
Status.setMessage(text);
}}
" map <Leader>l createScriptHint(getRstLink)
map yy :call getRstLink<CR>
getLink() -> {{
var text = window.location.href
Clipboard.copy(text);
Status.setMessage(text);
}}
map yl :call getLink<CR>
getJiraTicket() -> {{
var text = "[" + document.getElementById("key-val").textContent + "] " + document.getElementById("summary-val").textContent
Clipboard.copy(text);
Status.setMessage(text);
}}
site '*://*/jira/browse/*' {
map yj :call getJiraTicket<CR>
}
" https://github.com/1995eaton/chromium-vim/issues/464
closeAllOtherTabs() -> {{
Mappings.actions.closeTabsToRight()
Mappings.actions.closeTabsToLeft()
}}
map gxx :call closeAllOtherTabs<CR>
let qmark l = ["http://learning.oreilly.com"]
map t :tabnew https://ilya-bystrov.github.io/page<CR>
map w :open https://ilya-bystrov.github.io/page<CR>
map W :new https://ilya-bystrov.github.io/page<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment