Vim keymap in editor

(9 posts) (2 voices)

Tags:

No tags yet.

  1. maron, Member

    Any chance you could include the vim keymap in the editor. I realize it's not maintained anymore but it does exist.

  2. myDBR Team, Key Master

    The vim keymap in the CodeMirror was work in progress, so we decided not to include it.

    For now as it has no maintainer, it is unlikely to become any better soon. If there is improvement on it, we can add it.

    --
    myDBR Team

  3. maron, Member

    Seems like development is picking up on the Vim keymap binding.

    https://github.com/codemirror/CodeMirror/commits/master/keymap/vim.js

    Any chance to reconsider?

  4. myDBR Team, Key Master

    We can give it a run next time we update the CodeMirror. Adding it is an easy task, it just needs to be in level that someone would actually use it, not just for novelty item.

    --
    myDBR Team

  5. maron, Member

    Great, thanks for that. If you prefer to keep it out of reach I'd be happy to enable its support somewhere in code.

    Considering the fact that vi was released in 1976 and vim in 1991 it has shown amazing longevity, and is even today, one of the most popular programming environments around.

    https://insights.stackoverflow.com/survey/2017#technologies-and-occupations (scroll down to 2nd bar chart)

    I use it wherever I can and teach others to do the same.

    Happy to report back on the state of the plugin after some use.

    Best regards,

    Maron

  6. myDBR Team, Key Master

    While knowledge with vi is a good thing (as you can rely that it is an editor that will be there for you) and that the CodeMirror's vim-mode does offer some basic functionality, the vim-mode in CodeMirror is far from complete. As stated in the CodeMirror's vim page:

    Note that while the vim mode tries to emulate the most useful features of vim as faithfully as possible, it does not strive to become a complete vim implementation

    We can add the vim-keymapping into the SQL Editor, no problem. Just remember that it is not perfect.

    --
    myDBR Team

  7. myDBR Team, Key Master

    Newest build includes updated CodeMirror and enables the vim-mode.

    --
    myDBR Team

  8. maron, Member

    Thanks a lot, will make a leap of faith and report back on my findings.

  9. maron, Member

    As promised - have been using vim keymap mode for many months and everything works perfectly 99.9% of the time.

    There is a small bug in the vim implementation of CodeMirror that sometimes causes some characters to be repeated when editings - this is very rare and only happens once in every few hundred edits and disappears with a refresh. Haven't debugged further, but other than this vim keymap seems safe to use if anyone else wants to try - at least on Chrome for Mac.


Reply

You must log in to post.