Changes

Jump to navigation Jump to search
9 bytes added ,  02:34, 3 March 2017
m
no edit summary
=== Lexing ===
Textadept comes with an own ConTeXt lexer. A lexer is a file that defines command highlighting. So Since Textadept comes with an own ConTeXt lexer, it's is a good idea to bind <code>*.tex</code> and/or <code>*.ctx</code> files to Textadept's ConTeXt lexer. To do so:
1. Add the following lines to your <code>USER/.textadept/init.lua</code>:
textadept.file_types.extensions.tex = 'context'
* If you plan to use LaTeX and ConTeXt, you should use different file extensions. For example <code>*.tex</code> for LaTeX and for example <code>*.ctxcxd</code> for ConTeXt documents. In that case you only have to bind your new ConTeXt extension to Textadept's ConTeXt lexer, since <code>.tex</code> files are automatically recognized as LaTeX documents: textadept.file_types.extensions.ctx cxd = 'context'2. Restart Textadept to reload <code>init.lua</code>.
3. Open a ConTeXt document and check Textadept's status bar in the lower right corner. It should say '''context'''. If it says '''latex''' make sure it really is a ConTeXt file or repeat the procedure.
=== Snippets ===
Snippets are predefined code blocks. You add them, again, to your <code>USER/.textadept/init.lua</code>. Snippets in Textadept look like this:
-- The first line is mandatory:
194

edits

Navigation menu