Skip to content

Instantly share code, notes, and snippets.

@thedward
Last active June 14, 2017 23:23
Show Gist options
  • Save thedward/98aedf272cc3e38d0f6d to your computer and use it in GitHub Desktop.
Save thedward/98aedf272cc3e38d0f6d to your computer and use it in GitHub Desktop.
cvimrc
"set numerichints
"set typelinkhints
set nativelinkorder
let hintcharacters = "asonetuhid"
yankText(link) -> {{
var text = link.text;
text = text.replace(/^(\s|\n)+|(\s|\n)+$/g,'');
Status.setMessage(text,3);
Clipboard.copy(text);
}}
map zy createScriptHint(yankText)
map !F createActiveTabbedHint
"map ii fullImageHint
set scalehints
markdownLink() -> {{
var link = `[${document.title}](${document.location.toString()})`;
Status.setMessage(link,3);
Clipboard.copy(link)
}}
map zv :call markdownLink<CR>
getIP() -> {{
httpRequest({url: 'http://api.ipify.org/?format=json', json: true},
function(res) { Status.setMessage('IP: ' + res.ip); });
}}
map ci :call getIP<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment