# [Tex/LaTex] Syntax Highlight in “Insert TeX code” in LyX

lyxlyx-layouts

Is it possible to show syntax highlighting in the "Insert TeX code" boxes in LyX?

This would be very handy when one wants to input something longer using code.

For larger parts of ERT (evil red text = LyXism for inserted (La)TeX code) I generally employ an external editor and use Copy & Paste to move the code between LyX and my Editor. Instead of Copy & Paste one can also maintain the the TeX code in an external .tex file inserted with File > Insert > Child Document (Include Type = Input), which is useful during development or for maintaining larger parts of code.