On Sunday, August 3, 2014 5:43:12 AM UTC-5, Edward K. Ream wrote:

> There has been spectacular progress in the last four days.

And now, 7 days after I restarted this project, I am happily eating my own 
dog food. This has revealed many problems, most easily fixed.

As a result of my experiences,  I have added a brilliant hack, one that 
makes it possible for me to use vim-mode comfortably:

    ** <Return> in the body pane switches from normal mode to insert mode. 
**

This automatically does what I usually want ;-) More importantly, it 
provides a "safe key". When in doubt, I *don't* have to stop and think--I 
just type return.  If I was already in insert mode, an "extra" line gets 
inserted.  No big deal.  Getting an extra newline is *infinitely* better 
than typing normal mode commands, thinking that I am in insert mode.  
Understand?

Notes:

1.  <Return> in visual mode acts just like a terminating v: it clears the 
selection and enters normal mode.

Alternatively, it could replace the selection and enter insert mode.  What 
do you prefer?

2. At present, <Return> while editing a headline works just as before.

I would like to adapt this convention for headlines, but that's probably 
not possible. Instead, I'll soon add a callback to Leo's core code 
corresponding to Ctrl-H that will force vim into insert mode. This is what 
I *think* I almost always want.  The alternative is to enter insert mode 
only if the text is going to be highlighted, that is, if the text is 
newHeadline ;-)  I wonder how many of you have ever noticed this 
convention.  Hehe.

===== Summary

Eating my own dog food has been a great success. For the first time ever, 
vim mode is usable to this formerly-vim-hostile programmer.

It is truly remarkable how well vim-mode plays with the rest of Leo.  
Indenting text with the tab key is just one example.  Everything "just 
works".

Having said that, unless you are pretty adventurous, I would recommend 
waiting a day or two to use vim-mode for production work. There are several 
crashers to fix, dw doesn't work, and there are lots of unfinished 
commands. Worse, vim mode can sometimes get confused.  That must be fixed 
before vim mode is ready for most people.

Edward

P.S. The only rough edge relating to key bindings is Ctrl-R.  I love having 
u mean undo in normal mode, but I would be comfortable using Ctrl-Shift-U 
for redo.  Imo, a hard binding for *any* non-plain key in vim mode goes 
against the grain. Vim users: how important is Ctrl-R to you?

P.P.S. An important bug fix: Vim mode now resets itself (calls vc.quit) 
whenever a user types any Alt-Arrow key. This is essential! We absolutely 
can not allow a vim command to start in one node and end in another! One 
could imagine vim searches switching nodes, but only if they do not effect 
the dot.  I'll say more about such things soon in an ENB post.  For now, 
all vim-based searches will be node-only searches.

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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to