Hi Wsmith,
Wsmith wrote:LoveVim, I don't understand how you can enter insert mode, make a change, then make another change many lines away without escaping into command mode after your first change.
Perhaps this is a vim/gvim feature - I don't know - but under all Linux derivates I have
used in the past 10 years and in gvim for Windows you simple have to press
cursor keys, page-up, page-down or ctrl-home and so on to move the cursor. This works
in both insert and normal mode. You can navigate quite comfortable in insert mode.
And you can navigate quite comfortable in normal mode, but more powerful. Depending on
what you want to do and depending on the situation the insert mode or the normal mode may provide
the appropriate feature to do it in an efficient(!) way.
I'm very pragmatic here. I prefer the way which needs less keystrokes and which I can
handle fluently.
If I remember correctly even my first vi/vim version for Amiga in the beginning 1990th
had supported navigation in insert mode.
Wsmith wrote:...but it seems to me if you escaped after each discreet change, this would serve your purposes.
Yes, indeed this would increase the granularity of the undo command.
But I don't want to escape insert mode when I fluently type text/code just to increase
undo granularity due to the following reasons:
- it would be no longer a fluently typing
- it would lower efficiency since I have to press ESC and i each time I want to set
an undo point
For example how would you type this code?:
switch( nNumOfDays )
{
case ID_BUTTON_1:
break;
default:
break;
}
If I had the piece of code in mind, I would enter insert mode and would
start to type line by line (here with support of auto-completion and snippets,
but this is another topic and does not matter). Without leaving the insert mode.
How do you enter this code? Do you really leave here insert mode in every line?
If so you will definitely need more keystrokes than I would need - and not just
one or two...
Ok, I don't know vi, perhaps vi does not allow entering this in insert mode.
But your approach definitely lowers efficiency.
And if you type this fluently - and in my opinion efficient - without leaving
insert mode, you can simply run into the situation that you want to undo something.
But in the current undo implementation of ViEmu you would undo all(!) the typing you
have done in insert mode since entering insert mode. The complete switch code would be
undone (as typed so far)!
And in my opinion this is too much undo. I'm sorry.
If you want to increase granularity you have to leave insert mode more often.
This is clear. But this lowers efficiency. And a high efficiency is the reason
why I prefer Vim's input model and why I do not use one of the mode-less editors.
Greetings
LoveVim
P.S.: I have used the term "efficiency". In this context I mean "efficiency of
typing code" - not efficiency of designing and implementing software products.