Re: Vim/Viemu discrepancy that drove me nuts

I seem to have found a difference between vim and viemu. It's one that you might not notice if you're a vim master, but I'm just learning and it's been driving me bonkers.

I'm staying in command mode as much as I can, using the movement commands, but I don't know them all yet. I have the cheatsheet pinned up in my cube and I try out a new command now and then. I'm more productive in vim than notepad, and I miss the vim commands when I'm in other editors...but when I don't know a quick way to get somewhere and select a range, I'll drop back to the mouse. I use the mouse less and less, but when I'm trying to get work done it helps to have it as a backup.

So, in vim, I can be in insert mode, use the mouse to select a range, then start typing, still in insert mode, replacing that section of text.

But in viemu (studio 2005 standard), I start in insert mode, use the mouse to select a range, and that puts me in command mode!

So I've been trying to replace text with my old mousy method and all kinds of wackiness happens, and I finally figured out why...what I have to do to make it work right is select the range with the mouse, then hit "c" or "di" to delete that range and get back in insert mode.

Is there a setting I can change to make it stay in insert mode? Do you have an enlightening argument for why changing to command here is a great feature? Or is this a glitch?


Re: Vim/Viemu discrepancy that drove me nuts

Hi Dennis,

I will have to check the reason, it might just be an oversight. I don't touch the mouse with a ten foot pole, and it's probably the same for most other users. But I'll have a look at this and get back to you as soon as I can set some time apart, hopefully next week.




Re: Vim/Viemu discrepancy that drove me nuts

wouldn't it be easier to just disable viemu for a while.


Re: Vim/Viemu discrepancy that drove me nuts

thanks Jon!

no, I definitely don't want to disable viemu, I'm trying to learn as I work, pick up one command at a time until I can use it fully

now that I know what's happening it's easier to deal with, I just have to remember to hit the c


Re: Vim/Viemu discrepancy that drove me nuts

are you sure? there is a keyboard shortcut....
also very useful for when a coworker comes to your computer.


Re: Vim/Viemu discrepancy that drove me nuts

Yes, Ctrl-Shift-Alt-V toggles ViEmu quickly on/off.


Re: Vim/Viemu discrepancy that drove me nuts

Well Ctrl-Shift-Alt-V is useful but less convenient in this case than just hitting c smile

Not a problem for Vi experts, but seems to me viemu is ideal for people like me, programming in Studio and just getting started with Vi. When you're just starting to transition away from the mouse, and don't have all the navigation keystrokes in your spinal cord yet, it helps if the transition between keyboard and mousing is smooth, the way it is in Vim.

But, like I said, I can deal with it with one keystroke...so if it's a pain to fix at the moment, a note in the readme for the next guy would be the next best thing.


Re: Vim/Viemu discrepancy that drove me nuts

Hi Dennis,

I understand your missing a behavior you are accustomed to using. I've just checked it properly, and ViEmu does not really enter command mode - it enters visual mode. I feel it's important to keep this behavior, as it provides the best integration between the standard editor concept of 'selection' with vim's visual mode - you could have an external non-ViEmu command select some text, and then you are able to apply a vi operator to that since you're in visual mode.

vim provides 'select mode', which acts as you describe - it's like insert mode, and typing overwrites it. I think the best solution would be for ViEmu to provide select mode too, and provide it as an optional setting (that's what vim does). I've added this to the todo list, although with the current size of the request list it is not likely to make an appearance soon.

Thanks for the feedback and the detailed explanation,