Skip to content

Instantly share code, notes, and snippets.

@syon
Last active May 31, 2020 07:33
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 syon/dead5eaf1df35e770b85737a4877bc99 to your computer and use it in GitHub Desktop.
Save syon/dead5eaf1df35e770b85737a4877bc99 to your computer and use it in GitHub Desktop.
syon / cVimrc
set scalehints
set smoothscroll
let scrollduration = 300
let hintcharacters = "asdgwetcvb"
copyThisPageTitle() -> {{
var text = document.title || (document.querySelector("title") || {}).innerText || '';
RUNTIME('copy', { text: text });
Status.setMessage(text, 2);
}}
map yt :call copyThisPageTitle<CR>
copyThisPageLink() -> {{
var text = document.title || (document.querySelector("title") || {}).innerText || '';
var url = location.href;
var link = text + ' ' + url;
RUNTIME('copy', { text: link });
Status.setMessage(link, 2);
}}
map yl :call copyThisPageLink<CR>
copyThisPageAsMarkdownLink() -> {{
var text = document.title || (document.querySelector("title") || {}).innerText || '';
var url = location.href;
var link = '[' + text + '](' + url + ')';
RUNTIME('copy', { text: link });
Status.setMessage(link, 2);
}}
map ym :call copyThisPageAsMarkdownLink<CR>
copyThisPageAsScrapboxLink() -> {{
var text = document.title || (document.querySelector("title") || {}).innerText || '';
var url = location.href;
var link = '[' + url + ' ' + text + ']';
RUNTIME('copy', { text: link });
Status.setMessage(link, 2);
}}
map ys :call copyThisPageAsScrapboxLink<CR>
let blacklists = ["https://remotedesktop.google.com/*"]
@syon
Copy link
Author

syon commented Jan 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment