Markdown reference links screencast
August 26th, 2012 at 11:03 am by Dr. Drang
I made a short screencast of me using the Markdown reference link scripts I’ve shown in the last two posts. There’s no sound; the narration is typed on screen.
A few notes:
- I show myself choosing the commands from the BBEdit scripts menu, but I always use the keyboard shortcuts when I’m actually writing.
- Similarly, I show myself typing in the URL of a link, but I almost always paste in the link from the clipboard or use one of my TextExpander URL snippets.
- Sometimes the video starts out very blurry when viewed in fullscreen mode. I’m not sure why that happens, but rewinding and starting over has always corrected the blurriness for me. The video was recorded at 1152×720.
Here’s the text that appears on the screen during the video.
This is a screen recording to demonstrate how I use my Markdown reference link scripts.
Let’s say I want to link to the Google home page. If the text I want to use as the link is already in the document, I can just select it and call the New Reference Link command, either from the Scripts menu or through the ⌃L keyboard shortcut. I type (or paste) the URL into the dialog box, and the script runs, adding the reference to the bottom of the document and turning the selected text into a link.
On the other hand, if I haven’t typed the link text yet, I can invoke that same New Reference Link script, and it’ll insert a blank link that I can type the link text into: like this link to
When the URLs I want to link to are already in the document, I call the Old Reference link command, which is invoked through the menu or through ⌃⌥L. If the link text is in the document, I select it, call Old Reference Link, and choose the URL from the dropdown menu. Here’s an example of a link to a post on Nathan Grigg’s blog.
If the link text isn’t in the document, I can still call Old Reference Link, and it will add a blank link to the selected URL, with the cursor between the brackets waiting for me to type the link text, like this link to
That’s all!



August 26th, 2012 at 6:02 pm
Nice. I had begun to play with Sublime Text on markdown files, and it seems it has some reference link completion support. I just got a quick text on my work PC and am going to check it out more on my Mac.
Do your scripts work with TextWrangler?
Also, I was getting weirdness when hitting the full screen button on the video. It went full screen, but the video was side-by-side with the blog post in full screen rather than the video by itself. Seems like a Safari bug since when I tried various things putting Safari into full screen, it started messing up full screen mode.
August 26th, 2012 at 6:39 pm
Ryan,
I don’t know the answer to your TextWrangler question. I can only say that the shell and Python scripts will work fine, as they are independent of the editor. Whether the AppleScripts work depends on the depth of TextWrangler’s AppleScript library. You could give it a try—just change the
lines to
The only fullscreen weirdness I’ve seen is the extra fuzziness I mentioned in the post. I’ve never seen the video share the screen with anything else.
August 27th, 2012 at 6:10 am
Hi I notice in your video it shows keyboard shortcuts for some of the Applescripts in your script menu. How does one do that? Thanks
August 27th, 2012 at 8:24 am
Tom,
August 27th, 2012 at 11:13 pm
Thanks! I see from your response that this is limited to scripts within BBEdit. Would be nice if there were a system-wide version of this, but I looked again on Google before I wrote to you and couldn’t find anything.
August 29th, 2012 at 12:27 am
I got them working with TextWrangler and also added some mods to work with named refs. The
getreflinkscript would already list named refs, so that was fine (I did add the ref names to the drop down selections). I just changed the “Reference Link” script to use the output ofnextreflinkas a default name for the new link that I ask for in a dialog box, so you can press enter to accept the next number, type a name, or even delete it to use the selection as the ref name.