Open main menu

Changes

1,568 bytes added ,  22:03, 2 March 2017
m
no edit summary
(create the folder if it's not there yet).
There are more settings which you can look up in Textadept's [https://foicica.com/textadept/manual.html#Themes online manual].
 
=== Snippets ===
Snippets are predefined code blocks. You add them, again, to your <code>USER/.textadept/init.lua</code>. Snippets in Textadept look like this:
 
snippets['context'] = snippets['context'] or {}
snippets.context['emph'] = '{\\em %0}'
snippets.context['bold'] = '{\\bf %0}'
snippets.context['start'] = '\\start%1\n%0\n\\stop%1'
snippets.context['itemize'] = '\\startitemize\n\t%0\n\\stopitemize'
snippets.context['item'] = '\\startitem\n\t%0\n\\stopitem'
snippets.context['enumerate'] = '\\startenumerate\n\t%0\n\\stopenumerate'
snippets.context['chapter'] = '\\startchapter[title={%1},marking{%1}]\n%0\n\\stopchapter'
snippets.context['section'] = '\\startsection[title={%1},marking{%1}]\n%0\n\\stopsection'
snippets.context['ssection'] = '\\startsubsection[title={%1},marking{%1}]\n%0\n\\stopsubsection'
snippets.context['title'] = '\\starttitle[title={%1},marking{%1}]\n%0\n\\stoptitle'
snippets.context['subject'] = '\\startsubject[title={%1},marking{%1}]\n%0\n\\stopsubject'
snippets.context['ssubject'] = '\\startsubsubject[title={%1},marking{%1}]\n%0\n\\stopsubsubject'
 
* '''Note''' that a backslash is created as you would type it in ConTeXt: typing a double backslash <code>\\</code> prints a single backslash <code>\</code>.
 
*The most important formatting commands are the following:
**<code>%0</code> creates a primary or a single input caret
**<code>%1</code> creates a secondary input caret
**<code>%n</code> creates a new line
**<code>%t</code> creates a tab
194

edits