On 03/31/2010 05:53 PM, Liviu Andronic wrote:
Dear LyX developers
Would it be a good idea to allow users to edit ERT insets with an
external editor? I am thinking of something similar to:
1. Have a "Edit with external editor" entry to the ERT inset context menu
2. When activated, LyX would export the current contents of the ERT
inset to a temporary file, and open it with a (pre-defined) text
editor
3. When the user finishes editing the ERT code externally, saves the
temporary file and closes the editor, LyX automatically imports the
contents of the file in the ERT inset (if feasible) or the user
manually activates a "Refresh inset" context-menu entry
Such a feature should be useful to users that make heavy use of LaTeX
code in their documents. Personally I would use it for editing R code
in Sweave documents: when the code gets too complex, it is unbearable
to edit it in the ERT insets (no syntax highlighting, matching braces,
easy indentation, etc.). What do you think?
It is a good idea but it sounds a bit complicated to implement for the
communication of the child process; but it doable.
Another good option would be to use QScintilla:
http://www.riverbankcomputing.com/software/qscintilla/intro
Abdel.