As I am writing my PhD with Pandoc, and reccently switched to using Sublime Text for this purpose, I've been building some tools that help me with some of the basic Pandoc/Markdown mark up text. In particular that bane of all thoe who write theses of any sort: footnotes.
This plugin, for ST3 (sorry ST2 users, I have no idea if it works for you) is in this github repo: github.com/scotartt/PandocReferencr
There are two main commands: one (check_footnotes) scans the current file and makes sure every footnote insert e.g.^footnote1] has a corresponding footnote text entry somewhere else in the file:
^footnote1]: this is the text of the footnote number 1.
If also checks if every footnote text entry also has a footnote insert to match.
The other command (insert_footnote) asks for a footnote id (uses the first region of selection in the current buffer as a default), and then inserts it at the end of each selection. (if nothing is selected it acts as expected - inserts at the current cursor position). Then it asks for the footnote text data, and puts the footnote text at the end of the current buffer.
I've got some other ideas for functionality to add in the near future, like:
stop the crazy big warning dialogue for files with many footnote referencing errors
manual-fix and auto-fix broken footnote refs found
ability to put footnote text after each paragraph the footnote insert appears in rather than the end of the entire file, by configuration.
footnote clean up, i.e. move footnotes to paragraphs or all to end of file according to user preference of footnote placement.
footnote auto-renumbering, with automatic prefixing.
restrict to working with only relevant markdown and pandoc contexts (currently doesn't care what sort of file it's invoked in).
This is my first post here. Lurked in this forum for a week or so and it was very useful for finding answers to the many questions I had regarding sublime text's API.