Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu for configuring ACE (Vim/Emacs edit modes, etc.) #99

Closed
schmatz opened this issue Jan 7, 2014 · 5 comments
Closed

Menu for configuring ACE (Vim/Emacs edit modes, etc.) #99

schmatz opened this issue Jan 7, 2014 · 5 comments

Comments

@schmatz
Copy link
Contributor

schmatz commented Jan 7, 2014

From this article, the author thinks that these would be a good feature to offer to more advanced developers. I think it would be pretty awesome to have, especially as the contingent of more experienced developers increases.

@nwinter
Copy link
Contributor

nwinter commented Jan 7, 2014

I had written up some notes somewhere on how to do this, but now I can't find them. Basically ACE has all these options already and we just need to make an interface to turn them on!

@nwinter
Copy link
Contributor

nwinter commented Jan 8, 2014

Can't find them; oh well. Here we go.

Here's an example of all the options ACE lets you configure: ACE Kitchen Sink Demo

screenshot 2014-01-08 11 16 34

Of those, we probably want to expose just a handful, to keep options simple for players. These are the possible options with some excluded, with the most likely candidates bolded:

  • Font Size
  • Code Folding
  • Key Binding
  • Soft Wrap
  • Full Line Selection
  • Highlight Active Line
  • Show Invisibles
  • Persistent HScroll / VScroll
  • Animate scrolling
  • Highlight selected word
  • Enable Behaviours
  • Fade Fold Widgets
  • Enable Elastic Tabstops
  • Incremental Search
  • Show token info
  • Scroll Past End

(Setting the actual code language will be useful once we can support CoffeeScript and others, but might be more involved than just this menu–we'll see.)

Even if we just start off with the key bindings (allowing people to get Emacs / Vim modes going on), that'd be a good start.

So, how to do it? I imagine we need a few things:

Add a button somewhere to pull up a menu.

Perhaps this is just an option in the existing playback settings menu:
screenshot 2014-01-08 11 26 45
Code starts here: app/views/play/level/playback_view.coffee

Add a new TomeConfigurationView

This would be a ModalView that just had a couple menu options in it corresponding to the ACE options we want to expose. See how the ControlBarView opens up a MultiplayerModal. This would just adjust the client-side me User to adjust these options, and it would send out an event that the SpellViews could subscribe to for updating their ACE instance's options. See how music is set for an example of saving these User properties.

Add the ACE preferences to the User model

See Coco Models for a start on this. You'd need to add some sort of aceOptions object property to the User schema and to its Handler's privateProperties and editableProperties.

@nwinter
Copy link
Contributor

nwinter commented Jan 9, 2014

@GlenDC is working on this (seems I can't assign him to it).

@dkundel
Copy link
Contributor

dkundel commented Mar 13, 2014

Seems like this is not done yet. @GlenDC are you still planning on working on this? Otherwise I would love to work start working on this as I anyways started digging into all the Ace related things :)

nwinter added a commit that referenced this issue Mar 14, 2014
Implemented editor config to allow Vim & Emacs key bindings as proposed in #99
@nwinter
Copy link
Contributor

nwinter commented Mar 14, 2014

#545 fixes this!

@nwinter nwinter closed this as completed Mar 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants