On Monday, 16 April 2018 21:21:20 UTC-6, Tevian Dray wrote: > > Is there a way to load a custom key map into an embedded SageMathCell > using CodeMirror blocks? I am specifically interested in restoring my > favorite emacs key bindings. CodeMirror itself allows this; see: > https://codemirror.net/demo/emacs.html > (and take a look at the source code), essentially by loading > https://codemirror.net/keymap/emacs.js > and then passing > keyMap: "emacs" > in the CodeMirror call (at the end of the document). But there doesn't > appear to be a way to pass that setting as an option in the makeSagecell > call, nor could I figure out a way to apply the CodeMirror JS directly to a > sage block. > > Is there some way to achieve this functionality using SageMathCell? It's > a bit frustrating to know that CodeMirror has a setting for this, which I > don't (yet) know how to access. To be clear, I am of course talking about > SageMathCells embedded in my own webpages, where I have control over the > options. >
This is certainly not supported directly. In principle allowing arbitrary CodeMirror extensions and options could be useful, you can take a look at https://github.com/sagemath/sagecell/blob/master/js/editor.js and perhaps figure out a clean API with implementation for this ;-) -- You received this message because you are subscribed to the Google Groups "sage-cell" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-cell/75b0c176-237e-42ad-b032-b7068e32d093%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
