violentmonkey
violentmonkey copied to clipboard
Feature request: Include existing `./codemirror/keymap/*.js` files so we can specify vim/emacs/sublime keymaps in the editor config JSON
The code is already there in the library, and then the configuration JSON could contain:
{
[...]
"keymap": "vim"
}
I would write a user script to handle it but I'm not allowed, apparently. :-)
Personally, I'm against this because a) it adds 100kB of minified code, which will be used only by a few users, and b) Violentmonkey's general stance on editing is that you should use an external editor and enable tracking: https://violentmonkey.github.io/posts/how-to-edit-scripts-with-your-favorite-editor/
However, I'll defer to @gera2ld, who likes VIM.
I wouldn't want the extra load either. I'm not famililar with the code base, but is there a way to side load it or inject it from a CDN?
Loading from network into the extension process is possible but it requires 1) relaxing content_security_policy, which the web store reviewers really don't like so the extension would go into the slow queue and 2) to prevent tampering of the script's contents that would allow a MitM proxy to inject arbitrary coed into the highly privileged extension context we would have to use hashes on the link and probably also include them into content_security_policy. Overall, it's too much of a PITA.
Ok I'll just hack it in :-)