Extracts almost all codemirror keyboard shortcuts into proper SB
commands so they can be rebound
Bonus: renders prettier versions of keyboard shortcuts on Mac
* Fine tunes a few behaviors (like not adding extra newlines, ever
(should fix#1629))
* When a list item ends with :, it automaticaly indents the next item
* Adds an extensive test suite with various cases
This needs some more testing, but should be a good starting point for
adding more tweaks later.
Even though the service worker will proactively cache them in the
browser, the browser will not have to load them, parse them, interpret
them unless these languages are actually used. Less JS to load, less
waiting.
When the vim extension is enabled and in "normal" mode, some default
bindings collide with Silverbullets commands (eg: `ctrl-p` - Share,
`ctrl-o` - Open Document, `ctrl-e` - Export, `ctrl-g h` - Home). These
vim bindings are not always functional (they may appear to do nothing
depending on vims state). This gives the impression that Silverbullet is
bugged and wont trigger commands. In "insert" mode, most bindings are
passed through correctly with some exceptions (eg: `ctrl-o`).
By splitting the command keybindings into their own keymap extension and
loading it before the vim extension, we can ensure Silverbullet commands
always trigger.
This does mean some vim bindings are overshadowed, but if a binding
triggers a Silverbullet command, its generally obvious that *something*
happened and the user should be able to recognise why the vim binding
failed and then rebind the command or vim mapping.