Closed jchen closed 2 years ago
Oh, this is cool! Please add to the shortcuts dialog as well so they are discoverable.
Added all the shortcut dialogs! I didn't know this help menu was a thing so I did learn something new!
While I was in there, I styled the help dialog a bit - hope that's reasonable:
OK couple comments now that I've played with this:
I'd like to disable it in REPL entries. These can get focused for lots of reasons and it looks super weird there and completely occludes code in single-line entries
Is there a way to get a graphical/clickable close button for it? Many users will not think to press escape while focused on the search box especially if they brought it up by accident by fat-fingering Ctrl-V
@jpolitz These both should be possible - I might need to tinker with it a bit.
I suppose an unintended consequence of importing the script globally was that it applies to all CodeMirror instances which I didn't realize.
Feel free to revert the PR if this blocks other horizon changes from getting merged.
Nah I don't think it's worth reverting! It's a good improvement for a lot of people. We should just improve it.
Introduction
This adds editor functionality based on brownplt/pyret-codemirror-mode#10 (and depends on this PR). Added are the following keybinds:
Testing
Tested by running locally. Also feel free to bump line 53 of
package.json
:to use Codemirror mode changes from brownplt/pyret-codemirror-mode#10 atop CPO to test new functionality.