The API is here:
https://github.com/ajaxorg/ace/wiki/Embedding---API
The demo:
http://ace.ajax.org/build/kitchen-sink.html
The only problem I'm facing is that it is HUGE (6MB, 10 times editarea).
I don't know if it can be compressed, I'm still figuring it out.
What do you think?
Best regards,
Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com
(look the code fold feature)
I could reduce the src folder to around 361KB, without workers (I
think the syntax checkers for css and javascript: 1MB) and with only
the used syntax modes (python, html, css, js, json, xml, text), but
including visual themes (54KB) and even keybindings for emacs and vim
;-)
Do I must continue? or do we look for other options?
Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com
Looks like we only need:
/build/src/ace.js
/build/src/keybinding-emacs.js
/build/src/mode-css.js
/build/src/mode-python.js
/build/src/mode-javascript.js
/build/src/mode-coffeescript.js
/build/src/theme-clouds.js
and perhaps
worker-coffee.js
worker-css.js
worker-javascript.js
worker-json.js
not sue what the latter files do.
> --
> mail from:GoogleGroups "web2py-developers" mailing list
> make speech: web2py-d...@googlegroups.com
> unsubscribe: web2py-develop...@googlegroups.com
> details : http://groups.google.com/group/web2py-developers
> the project: http://code.google.com/p/web2py/
> official : http://www.web2py.com/
> --
> mail from:GoogleGroups "web2py-developers" mailing list
> make speech: web2py-d...@googlegroups.com
> unsubscribe: web2py-develop...@googlegroups.com
> details : http://groups.google.com/group/web2py-developers
> the project: http://code.google.com/p/web2py/
> official : http://www.web2py.com/
> <web2py_ace_editor.png>
make speech: web2py-developers@googlegroups.com
unsubscribe: web2py-developers+unsubscribe@googlegroups.com
> make speech: web2py-developers@googlegroups.com
> unsubscribe: web2py-developers+unsubscribe@googlegroups.com
That is already possible since 1.99.5:
http://reingart.blogspot.com/2012/02/new-web2py-online-python-debugger.html
What this editor enables it to being able to mark the breakpoints in
the editing windows (i.e. with a red sign near the line number),
and/or highlight the currrent line.
It also open new possibilities like autocompletion, calltips,
hovering, syntax checking and error mark/highlight, etc.
It has better configuration and addons scheme as it is being used by
github to make a full web IDE (cloud-9, but I think only works for
js).
> I have also run into issues where an app runs fine in Rocket, but acts
> strangely when run in WSGI. Debugging through the web interface would allow
> me to debug these issues, since putting a breakpoint in code running in WSGI
> usually causes requests to fail with Bad Quit.
If you don't use multiples process (but use multiple threads), you can
use the online web2py debugger.
If you use a multiprocess setup, you can use my IDE (rad2py) to
remotelly attach to a production server (I'm working on the
webservices admin to ease all the steps as it is not trivial right
now)
> On Monday, March 12, 2012 10:46:40 PM UTC-4, Massimo Di Pierro wrote:
>>
>> emacs bindings. I am sold.
:-)
>> Looks like we only need:
>> /build/src/ace.js
>> /build/src/keybinding-emacs.js
>> /build/src/mode-css.js
>> /build/src/mode-python.js
>> /build/src/mode-javascript.js
>> /build/src/mode-coffeescript.js
>> /build/src/theme-clouds.js
exactly
>> and perhaps
>>
>> worker-coffee.js
>> worker-css.js
>> worker-javascript.js
>> worker-json.js
>>
>> not sue what the latter files do.
I think they do on-the-fly syntax checking.
It has better configuration and addons scheme as it is being used by
github to make a full web IDE (cloud-9, but I think only works for
js).
http://reingart-web2py.googlecode.com/
hg clone https://rein...@code.google.com/r/reingart-web2py/
Pull against trunk:
hg pull https://code.google.com/r/reingart-web2py/
It is working like textarea, there are two new config variables in
admin/models/0.py:
## Default editor
TEXT_EDITOR = 'ace' or 'edit_area' or 'amy'
## Editor Color scheme (only for ace)
TEXT_EDITOR_THEME = "chrome" ...
## Editor Keyboard bindings (only for ace)
TEXT_EDITOR_KEYBINDING = '' #'emacs' or 'vi'
If this work well, I'll add nicer markers to breakpoints, and, maybe,
line highlight / autocomplete.
If anyone want to help, welcome!!!!!
Please, help me to test it!
Best regards
Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com
> --
> mail from:GoogleGroups "web2py-developers" mailing list
> make speech: web2py-d...@googlegroups.com
> unsubscribe: web2py-develop...@googlegroups.com
Best regards,
Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com
Yes, I've included the binding, look at applications/admin/models/0.py
configuration:
TEXT_EDITOR_KEYBINDING = 'emacs' or 'vi'
It should work (it was adapted from the example).
The problem is I don't know what the emacs keypresses are :P
BTW, we can add commands and binding as we want (see the Ctrl+S example).
Best regards,
Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com