sqlectron / sqlectron-gui

A simple and lightweight SQL client desktop with cross database and platform support.
https://sqlectron.github.io/
MIT License
4.58k stars 524 forks source link

Vim support #641

Open austinwilcox opened 3 years ago

austinwilcox commented 3 years ago

Is there any support for vim in the editor?

maxcnunes commented 3 years ago

No, I don't think so. Btw, I am a Vim user too, it would be nice to support it here. But, to be honest it would be a very low priority.

austinwilcox commented 3 years ago

I did a little bit of looking through in the code, and it looks like Ace Editor supports vim/emacs mode. It might be something just as simple as adding keyboardHandler="vim" in our options for the Ace Editor. I would be happy to create a pull request and add this feature in, and as well toss in the settings for users to toggle this mode.

maxcnunes commented 3 years ago

Sounds good to me. I just have to give the heads up that I am considering moving to the Monaco editor https://github.com/sqlectron/sqlectron-gui/issues/614, but not sure when given we have other higher priorities to be done first. But, if you add vim support now, I will take it into consideration when the time to decide whether moving or not to the Monaco editor comes. Although Monaco does not have a built-in VIM support (https://github.com/microsoft/monaco-editor/issues/182), there is this package that seems to implement it well https://github.com/brijeshb42/monaco-vim, so it should be possible to keep VIM support during that transition if that occurs.

austinwilcox commented 3 years ago

When/If you move to the monaco editor in the future, I would be happy to create another pull request and add in the monaco-vim extension to the project to incorporate vim support.