TheodoreChu / append-editor

Append to your notes @StandardNotes with GitHub Flavored Markdown via CodeMirror, Rich Markdown, and Monaco | https://appendeditor.com
https://beta.appendeditor.com
Other
78 stars 3 forks source link

[Feature Request]: Vim keybindings #17

Open krillin666 opened 4 years ago

krillin666 commented 4 years ago

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 commented 3 years ago

bump

TheodoreChu commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 !