Changes

Jump to navigation Jump to search
132 bytes added ,  12:12, 4 March 2017
no edit summary
=== Step 4.2: Lexing (command highlighting & code folding) ===
A lexer is a file that defines command highlightingand code folding keywords. Since Textadept comes with an own ConTeXt lexer, it is a good idea to bind <code>*.tex</code> files to Textadept's ConTeXt lexer, as otherwise you won't benefit from the mentioned features when writing ConTeXt documents. To do so:So
1. Add add the following lines line to your <code>USER/.textadept/init.lua</code>and save it afterwards:
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 <code>*.cxd</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:
194

edits

Navigation menu