Merge pull request 'Expose Vim object in order to create custom keybindings' (#1816) from JohnBjrk/strudel:expose-vim-for-custom-keybindings into main
Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1816
This commit is contained in:
commit
06f9c2dfb5
3 changed files with 24 additions and 0 deletions
|
|
@ -4,3 +4,4 @@ export * from './flash.mjs';
|
|||
export * from './slider.mjs';
|
||||
export * from './themes.mjs';
|
||||
export * from './widget.mjs';
|
||||
export { Vim } from './keybindings.mjs';
|
||||
|
|
|
|||
|
|
@ -131,6 +131,8 @@ const keymaps = {
|
|||
vscode: vscodeExtension,
|
||||
};
|
||||
|
||||
export { Vim } from '@replit/codemirror-vim';
|
||||
|
||||
export function keybindings(name) {
|
||||
const active = keymaps[name];
|
||||
const extensions = active ? [Prec.high(active())] : [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue