I use vi and BBEdit. I have for a long time. They both have strengths. Sometimes I use them both with the same files. This article is mostly about BBEdit and markdown. Since I’ve started writing all my posts in markdown I’ve been keeping my eye out for tools to make things more convenient.
Converting to BBEdit¶
Why have a section on converting if I’ve been using BBEdit already? Sometimes, conversion articles are general, vague, and not terribly informative unless you’ve effectively never heard of the product before. Other times, the articles are focused, and can be quite helpful. Even if you know how to use the application in general, some conversion articles focus on specific aspects or attributes that you may not have come into contact with before. This article1 is an example of the latter. It lead me towards many different markdown related aspects of BBEdit and was generally useful.
BBEdit Markdown Extension Package¶
I found this package linked from the above article I mentioned by Macdrifter. I take advantage of most of a number of the goodies in this package2 including:
- Safari Tabs to Ref List - Adapted from Brett Terpstra’s “Blogsmith” bundle for TextMate, this will create a reference-style list of all open tabs in the frontmost Safari window. This version is different from Brett’s in two regards: one, it doesn’t present a dialog box asking you to select which tabs you want—it just grabs all of them. Two, it doesn’t try to assign reference names, but instead lets you tab through the list to enter your own references. (This reflects my own usage, since I didn’t like Brett’s naming convention very much.)
- Paste as Markdown - This takes “rich text” on the clipboard and pastes it into a BBEdit document as Markdown. (The nerdy details: it converts from RTF to HTML and then from HTML to Markdown, then runs a bit of cleanup on the output.)
Markdown Reference Links in BBEdit¶
What are reference links? Normal links look something like this:
[foo](https://my.site.tld/path/to/content). Reference links look similar:
[foo]. Then, at the bottom of your document, you list your links:
NOTE: You can also, instead of using numbers for your references, use words. This could look like:
[foo][foo] and at the bottom,
Sometimes managing links in Markdown can be annoying. Here3 are a collections of scripts that integrate with BBEdit to help manage the reference links.
Named anchors in Multi-markdown¶
There may be occasions when you want to link from one part of an article to another. Enter named anchors4. These provide a way to link internally in the document. Named anchors look something like:
<a id="id">Thing I'm anchoring</a>. Once the anchor is in place, you can reference it in the document with
[Reference to Thing](#id).
Footnotes and abbreviations¶
Footnotes and abbreviations are fairly similar in terms of syntax. Here is a table showing both:
|Markdown Syntax||Rendered on the page|
||1. Sample footnote|
The footnote goes at the end, but it needs a corresponding entry in the article (same syntax -
thing_with_footnote[^footnote]). The abbreviation (also at the end of the article) differs in that it finds all mentions of that abbreviation and inserts a mouseover with the text that follows it.
Footnotes and References
So what do you think? Leave your comments below.