Excellent work, Edward,
I'll definitely test vim-mode in the coming days.
On Sunday, August 3, 2014 1:43:12 PM UTC+3, Edward K. Ream wrote:
>
> There has been spectacular progress in the last four days. The first
> recent commit, e7efb78..., was only three days ago, on July 31!
>
> It may actually be possible to use vim mode for actual work, although I
> would not recommend do so yet.
>
> To enable vim mode, just set @bool vim-mode = True in the @settings tree
> for a test .leo file. Please report any real problems immediately.
>
> Vim mode now demonstrates all important features of vim:
>
> - The status line showing accumulating commands and shows what the dot is.
> - All simple motion commands work, h,j,k,l. At present, plain arrow keys
> are equivalents.
> - The dd and d{motion} commands work.
> - All insert modes work: a,A,i,o,O.
> - Repeat counts work with all of the above commands: 3dd, 3d2j, 5j,
> 5itest<escape>, etc.
> - Visual mode works: v{motions}v or v{motions}escape work, but not the
> follow-on commands such as v{motions}d.
> - All changes persist made in a node persist when changing nodes, and all
> changes are undoable, with either u & Ctrl-R or Leo's traditional undo
> bindings, Ctrl-Z and Shift-Ctrl-Z.
> - The : command enters the minibuffer, exactly as Alt-X does. minibuffer
> commands do not affect the dot.
> - The dot command passes *simple* tests. I would be wary of this command
> for now ;-)
>
> Even better, vim mode uses Leo's existing code base in many ways:
>
> - Return in headlines and in outline panes work as always.
>
> - Ctrl-g is handled outside of vim mode: it is still the "universal escape
> code". It resets vim emulation to normal mode.
>
> - insert-mode just passes keys to Leo's existing code. This means that
> insert mode supports syntax coloring, abbreviations, auto-indentation and
> *all* key-related settings. All without *any* code in leoVim.py!
>
> - Except for Ctrl-R, *all* of Leo's non-plain key bindings work *within*
> vim mode just as they always have. In particular, you can save work with
> Ctrl-S without changing vim's state ;-)
>
> - Many other subtle integrations between Leo and vim-mode "just work".
> This is truly unexpected, and means that vim emulation will be much
> smoother than I ever dreamed would be possible.
>
> Much work remains to be done. Many vim commands remain to be implemented.
> If you want to lobby for a particular vim feature, feel free to do so.
>
> Edward
>
> P.S. The code continues to get simpler while it gets more powerful. This
> is an extremely good sign. When I woke this morning I saw how to make the
> code even more straightforward. I'll describe the new approach in a
> separate ENB post.
>
> 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.