What problem are you trying to solve?
In a previous post, Implementing a better chair in the sky, Past Me told me to figure out what problem I was trying to solve before solving it. Since Past Me often gives Present Me good advice, then-Present Me listened to it. (This is another Present Me writing this for the benefit of Future Me)
See: 70 Years Old. WTF!: Thank you, Past Me. Thank you, random stranger
So the problem I was trying to solve is this one: I’m finishing up a post. I need to get some links. That’s annoying. I have to take the text where I want the link to be, put square brackets around it, and an open paren, then find the page I want, go to the omnibar, select the URL if it’s not selected, type Ctrl-C, go back to my document, type Ctrl-V, and then close the tab. Annoying. Chair in the sky annoying!
And if I want to link to the title of the article, like when citing my own post, it's: look the post. Select the title. Ctrl-C. Back to the post that I am composing. Type [, Ctrl-V and then ] and (, back to the document. Click in the link. Ctrl-C. Back to the post, Ctrl-C again, and then (whew!) Ctrl-V.
So the problem is: I want to take a URL that’s on my clipboard and converted to Markdown.
So just
fuckingask Google. Or should it be: So just ask
fuckingGoogle. (I’m never sure where the fucking emphasis fucking goes.)
URL to Markdown? Easy! How about this package from the amazing Sondre Sunderhus: sindresorhus/urls-md: Convert URLs to Markdown links: Extracts URLs from text → Gets their article title → Creates Markdown linksChrome extension.
Which uses this one: sindresorhus/get-urls: Get all urls in a string and sindresorhus/article-title: Extract the article title of a HTML document
Or convert HTML to markdown using HTML to Markdown Converter - Markdown Editor - Online - Browserling Web Developer Tools Or maybe this one: Paste to Markdown with the code on GitHub here: euangoddard/clipboard2markdown: Convert rich-text on your clipboard to markdown
Wow! That’s a lot of links! It must have been hard to do all that copying and pasting and typing. But I didn’t! I used a Chrome extension: Copy as Markdown - Chrome Web Store Yeah, but can I use that without the environment? You can if you go to his GitHub project: chitsaou/copy-as-markdown: Copying Link, Image and Tab(s) as Markdown Much Easier.
But I want a shortcut that does that.
Easy. Go to the Extensions page, and under the hamburger menu pick “Keyboard Shortcuts and assign away. Every extension that lets you have keyboard shortcuts publishes its setting there.
Who knew?
And before I forget it, maybe this: mikecrittenden/shortkeys: A browser extension for custom keyboard shortcuts