Re: [SUGGESTION] Make toggle case work like vim

In vim the toggle case function (~) allows for a movement so you can, for example, toggle case on the rest of the word with ~w.


Re: [SUGGESTION] Make toggle case work like vim

My vim installation, which is what I emulated, has '~' as a direct command that toggles a single char in normal mode (several chars if you type, for example, '5~'), it acts as an operator over the whole visual selection in visual mode, and it can be used as an operator in normal mode in the form 'g~'. So, in ViEmu, g~w does what you mean.

Maybe there is a vim setting I'm not aware of which works the way you mention?

One possibility is that you are using a non-US keyboard? The ~ character is notable for some weird behavior in other keyboard layouts (in Spanish, for example, AltGr-4 gets you ~, but you have to press it *twice*).




Re: [SUGGESTION] Make toggle case work like vim

I setup my vim so long along I forget what might be an option. I have "set tildeop" in my config file and that defined to:
    When on: The tilde command "~" behaves like an operator.

I did confirm that g~w does what you indicate (and acts like ~w does with tildeop enabled. I might need to adjust my vim so it acts the same way as ViEmu.

(What I really want is to make a string all uppercase or all lowercase and that's something I'll need to write as a function I'm thinking)


Re: [SUGGESTION] Make toggle case work like vim

Ah ok, now I get it. I didn't know about the 'tildeop' setting. I'll take note of it for a future ViEmu version.

guf" and gUf" from the opening quote should work for what you're after, if I'm understanding you well. Both in vim and ViEmu.


Re: [SUGGESTION] Make toggle case work like vim

Actually thats exactly what I was looking for, thanks.


Re: [SUGGESTION] Make toggle case work like vim

You're welcome, great to hear that!