Skip to content

SublimeText Snippet

devtyr edited this page Oct 7, 2012 · 2 revisions

If you use Sublime Text to edit Markdown files, you might create a snippet for the headers used by ideamark. To do so, go to Tools / New Snippet .... This will open:

<snippet>
  <content><![CDATA[Hello, ${1:this} is a ${2:snippet}.]]></content>
  <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
  <!-- <tabTrigger>hello</tabTrigger> -->
  <!-- Optional: Set a scope to limit where the snippet will trigger -->
  <!-- <scope>source.python</scope> -->
</snippet>

Override it with this snippet:

<snippet>
	<content>
<![CDATA[
Language:     enter en, de or another language you might have configured with ideamark
Title:        replace with your document title
Date:         enter date in format YYYY-MM-DD
Description:  description of your document
Menus:        enter menu identifier. per default this can be inprogress or finished
Status:       enter status identifier. per default this can be inprogress, finished or approved
Tags:         define tags descriping your document


-----


## Go ahead
]]>
	</content>
	<tabTrigger>ideamark</tabTrigger>
	<description>Inserts ideamark header to your markdown file</description>
</snippet>

Save this snippet under %AppData%/Sublime Text 2/Packages/User (on Windows systems, otherwise in the configured snippets folder of your Sublime Text installation).

From know, you can generate the header by entering

ideamark

and pressing the TAB key. If you don't want ideamark as the tab trigger, change property tabTrigger how you like it.

You can find the snippet as a Download.

Clone this wiki locally