There has been lots of progress in the last few days. For a full list, see the headline called "Vim: documented in commit logs".
I am still far from a lover of vim, but I have had no trouble whatever developing Leo in vim mode. I invite you to try vim mode if you have any interest in it. Some highlights: 1. All unit tests now pass when running unitTest.leo with @bool vim_mode = True(!!!) This shows how separate vim mode is from the rest of Leo. Only one test needed to change, a test of typing. I added a virtual 'i' keystroke to put the test in insert mode ;-) 2. Repeat counts now work in all the expected places. All variants of the d command appear to work: dd, 5dd, 2d3j, dgg, dG, d3h, d0, d$... 3. The jj abbreviation switches to normal mode. And now it does so without changing the .leo file's changed status. 4 The gui has been polished in several important ways: - Clicks in the body text leave vim's mode unchanged. This was driving me starkers. - Editing a headline puts you in insert mode. - Vim mode updates the borders in both headlines and body text immediately, not at idle time. This removes an annoying delay. - The status area no longer shows the dot. The clutter was annoying. We'll have a show-dot command soon enough. - Vim mode now delegates *all* arrow keys to k.masterKeyHandler, ensuring that they are handled as before. 5. Many crashers and pseudo-hangers have been squashed. ===== Coming soon - yank and paste. - vim-like searches. It will be surprisingly easy to do. As mentioned in another post, / and ? will start Leo's traditional minibuffer search. The actual search code will remain completely unchanged. The # and n commands (in vim) will basically do F2 or F3. Not sure whether searches affect the dot, but that can wait for later. ===== Summary Vim mode should be usable now. More commands are coming soon. I expect to be working intensely on this project for a few more days. It is incredibly easy to mix and match workflows, using Emacs-like control keys or vim-like keys as desired. That's why all unit tests still pass! This is a totally unexpected development! The basis of scanning vim commands seems solid and extensible. A few behind-the-scenes improvements are coming, but there is no need to wait for them. Vim-mode should be safe as is. Edward P.S. Ironically, plugins could easily modify vim-mode's "hard-coded" dispatch tables. This is another unexpected development. None of the complexity originally envisaged turns out to be necessary. EKR -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
