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

[Feature Request]: Vim keybindings #17

Open
krillin666 opened this issue Jul 11, 2020 · 5 comments
Open

[Feature Request]: Vim keybindings #17

krillin666 opened this issue Jul 11, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@krillin666
Copy link

First of all, this editor is my favourite one and has helped me a lot while taking notes.
I noticed you integrate Codemirror into this editor and since it is possible to enable Vim bindings in CodeMirror I wonder if this could be done as well for the Append editor ?

Thank you and keep up the good work.

@krillin666 krillin666 added the enhancement New feature or request label Jul 11, 2020
@krillin666
Copy link
Author

bump

@TheodoreChu
Copy link
Owner

Hi @krillin666, I am not familiar with Vim bindings in CodeMirror, but this website says they are no longer maintained: https://codemirror.net/demo/vim.html. I am not sure how I feel about enabling them

@krillin666
Copy link
Author

Hi @krillin666, I am not familiar with Vim bindings in CodeMirror, but this website says they are no longer maintained: https://codemirror.net/demo/vim.html. I am not sure how I feel about enabling them

Hello, thank you for the response.
I hadn't saw it wasn't maintained any more by CodeMirror, therefore I understand your concerns about enabling them. However, would it be possible to compile the editor myself and enable the VIM bindings to test it out ?

@TheodoreChu
Copy link
Owner

Yes, there is a way to compile the editor yourself and enable the VIM bindings to test it out.

The instructions for setting up the development environment is available here: https://github.com/TheodoreChu/append-editor#development

The CodeMirror add-ons are imported here: https://github.com/TheodoreChu/append-editor/blob/master/app/components/AppendEditor.js#L9-L29. First add import 'codemirror/keymap/vim'; to a new line.

Then, add keyMap: 'vim', to the CodeMirror configuration (there are two, one for Edit and one for Append):

You can compile it with npm run watch and serve it with npm run serve and visit localhost:8003/dist/index.html in your browser. I think the VIM binding should work as in the demo.

@krillin666
Copy link
Author

krillin666 commented Feb 8, 2021

Hello Theodore @TheodoreChu ,

Excuse me for commenting on this closed issue. However, since SN officially has a VIM editor which uses CodeMirror has a backend (https://standardnotes.org/extensions/vim-editor), could you give it a try to add VIM mode as a setting options in the Append Editor ?

Thank you for your time !

@TheodoreChu TheodoreChu reopened this Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants