[IPython-dev] Ace versus CodeMirror

Jason Grout jason-sage at creativetrax.com
Mon Jan 23 07:41:13 EST 2012


On 1/23/12 6:33 AM, Jason Grout wrote:
> Also, CodeMirror technically can actually apply a rst mode
> (http://codemirror.net/mode/rst/index.html) just inside of docstrings,
> though I don't know if the mode overlay is written yet.  That would be
> cool, though.  I looked into writing it a long time ago, but haven't yet
> and likely won't have time in the near future.

See the HTML mixed mode at 
http://codemirror.net/mode/htmlmixed/index.html or 
http://codemirror.net/demo/mustache.html for an example of this. 
Basically, you just have to have the python parser have a special state 
or docstrings, and then apply the rst mode in that state.  Or something 
like that.  See the last three paragraphs of 
http://codemirror.net/doc/manual.html.

Jason




More information about the IPython-dev mailing list