Useful snippets for SWEL in Sublime
Go to Tools-Developer-New Snippet and paste this, save as a familiar name, then set a new keybind in preferences to activate.
This one lets you dump a bunch of text into sublime, highlight it, then press a keybind to wrap that text in a new page. You can modify it to taste based on the project you are working on. The $1 does two things, the cursor will appear there when you add the page, and anywhere $1 is placed, the text you add to title will also appear there. You can also add $1, $2, $3...if you want to tab through a lot of fields such as a new piece of gear - and you want to add that manually.
<snippet>
<content><![CDATA[
[[###$1
@@chapter::Crown of the Kobold King
@@subchapter::
@@blocks.*.blocktype::header
@@blocks._.frame::picture
@@blocks._.text::$1
@@blocks.*.text::"""
$TM_SELECTED_TEXT
"""
]]
-------------------------------------------
]]></content>
<description>###Page</description>
<scope>text.html.basic</scope>
</snippet>
Example KeyBind:
// These are SWEL snippet commands, change NewPageSWEL to your chosen familiar name, and choose a key to bind.
[
{ "keys": ["ctrl+2"], "command": "insert_snippet", "args": { "name": "Packages/User/NewPageSWELL.sublime-snippet" } },
]