Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support emacs keybindings for insert mode #109

Open
amosbird opened this issue Dec 24, 2019 · 4 comments
Open

Support emacs keybindings for insert mode #109

amosbird opened this issue Dec 24, 2019 · 4 comments

Comments

@amosbird
Copy link

It would be nice to have alt-f,b,d,BS, ctrl-f,b,a,e,d,p,n defined in insert mode

@benlindsay
Copy link

I know emacs keybindings are really great too, but I'm not sure a vim emulator is the place to ask for emacs keybindings. Maybe you should check out https://github.com/kpe/jupyterlab-emacskeys ?

@amosbird
Copy link
Author

Well. Modal editing is a must. Keybindings come after. I tried enabling both extensions and both stop working

@benlindsay
Copy link

I agree that being able to switch between editing modes would be ideal, especially in a multiple-user setup. It would be nice if Jupyter Lab had a better story regarding turning extensions on and off like VSCode and friends. Without that, as a user I wouldn't have a problem with enabling emacs keybindings as long as it doesn't make it more difficult to maintain vim keybindings. I haven't dug into the code though so I have no idea whether it would

@amosbird
Copy link
Author

hmm, I tried adding these mappings

            lvim.map('<C-i>', '<C-t>', 'insert');
            lvim.map('<C-a>', '<Home>', 'insert');
            lvim.map('<C-e>', '<End>', 'insert');
            lvim.map('<C-f>', '<Right>', 'insert');
            lvim.map('<C-b>', '<Left>', 'insert');
            lvim.map('<C-j>', '<Down>', 'insert');
            lvim.map('<C-k>', '<Up>', 'insert');
            lvim.map('<C-d>', '<Del>', 'insert');

However they didn't have any effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants