I am trying to remap a keybind for the <esc> sequence within CodeMirror's 
vim editor in TW5. The vim editor does support the use of the ex command 
:imap kj <Esc>
however this is not a global approach. As outlined in 
https://github.com/codemirror/CodeMirror/issues/2840, it would seem I need 
to call the js function
CodeMirror.Vim.map('kj', '<Esc>', 'insert')

I  have tried including the above call within 
*$:/plugins/tiddlywiki/codemirror/keymap/vim.js 
*but to no avail. However, I may not be implementing the call correctly. 

*Is there a method to run the necessary script whenever vim.js is called?*

For reference, here is the defined vim.js 
https://codemirror.net/keymap/vim.js. I was trying to include  
CodeMirror.Vim.map('kj', '<Esc>', 'insert')
after 
CodeMirror.Vim = Vim();
near the very bottom of vim.js.

Thanks for any help!

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" 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/tiddlywiki/e6b8fcaa-afb8-4e32-a0fc-e13bfe5e2c53%40googlegroups.com.

Reply via email to