klembot / twinejs

Twine, a tool for telling interactive, nonlinear stories
https://twinery.org
GNU General Public License v3.0
1.86k stars 288 forks source link

Embed Ace Editor in Twine #242

Open klembot opened 8 years ago

klembot commented 8 years ago

Originally reported by: Florencia Aldana Rodriguez (Bitbucket: florenciaAldana, GitHub: Unknown)


Since the editor becomes really uncomfortable when trying to use things like underscore and jquery, we could replace it with ace editor(demo: https://ace.c9.io/#nav=about), an open source code editor written in javascript. This would give us a full fledged editor inside Twine 2 and we could create extra modules to support other story formats.

I could try to implement this and make a pull request if that's fine with you.


klembot commented 8 years ago

Original comment by Florencia Aldana Rodriguez (Bitbucket: florenciaAldana, GitHub: Unknown):


I'm using the desktop version of Twine 2 on Linux Mint 17.3, but I just tested Twine in chrome and ctrl-z and ctrl-y work inside the browser.

Yes, I would like to take a crack at that, but I will be going slowly because I entered the Spring Thing and will be working on my submission.

klembot commented 8 years ago

Original comment by Chris Klimas (Bitbucket: klembot, GitHub: klembot):


Hmm, I do get undo and redo with Command-Z and Command-Y, but that may be because of the browser I'm using (Chrome on OS X).

It does sound like a lot of your needs would be best addressed with a Snowman highlighting mode -- it doesn't offer one at all right now. Would you like to take a crack at that?

klembot commented 8 years ago

Original comment by Florencia Aldana Rodriguez (Bitbucket: florenciaAldana, GitHub: Unknown):


Hi,

Oops, sorry, I didn't notice we were using CodeMirror already. The main advantage would be that some functionality that codemirror offers by addons is offered by default in Ace. There are other advantages, but I don't think they will be necessary for twine(e.g.: support for command line out of the box, textmate .tmlanguage and .tmtheme files). Since CodeMirror is already implemented it would be easier to enable the features that I'm missing.

My main issue is that I'm lacking shortcuts (ctrl-z for undo, ctrl-y for redo) and that I lack syntax highlighting when using javascript with snowman. But I'm not sure if the later is an snowman issue (e.g.: The story format is missing a syntax file) or a twine issue(Syntax highlighting for javascript is not enabled, should it be enabled anywhere so people can use it in harlowe inside Githubissues.

  • Githubissues is a development platform for aggregating issues.