Changes

Jump to navigation Jump to search
344 bytes added ,  21:04, 30 March 2017
m
Added some info about snippets.
snippets['context'] = snippets['context'] or {}
-- Snippets start here:
snippets.context['emph'] = '{\\em %<selected_text>%0}' snippets.context['bold'] = '{\\bf %<selected_text>%0}'
snippets.context['start'] = '\\start%1\n%0\n\\stop%1'
snippets.context['itemize'] = '\\startitemize\n\t%0\n\\stopitemize'
* The most important formatting commands are the following:
**<code>%0</code> creates a primary input ''closing'' caret (placeholder) (the cursor will jump here first'''last''')**<code>%1</code> creates one or multiple secondary input carets(1, 2, 3 and so on; you can also use the same integer multiple times: e.g. <code>\\start%1 ... \\stop%1</code>)
**<code>%n</code> creates a new line
**<code>%t</code> creates a tab
**<code>%<selected_text></code> this is where highlighted text will be pasted when enclosing it with a snippet (e.g. <code>{\\emph %<selected_text>%0}</code>)
* After adding snippets, you have to restart Textadept firstor reset Lua state as described in Step 4.
* You can paste snippets into ConTeXt documents
194

edits

Navigation menu