1

Re: Search/Replace switches and caps-lock commands

I had to copy/paste into vim in order to accomplish this because the command doesn't work in viemu.

s/"\(.*\)"/"\U\1"/

In order to convert lower case into all upper case. \u \U \l \L didn't work. Just wondering if you are going to be adding in the various flags/switches in for the search/replace regex stuff. This is stuff that I'd like to see. Perhaps even if it could be extended beyond vim capabilities wink There are times when I've had to do things in steps because vim isn't capable of doing the odd processing i wanted.

Second comment is that in vi/vim/gvim if you have caps-lock, hitting a key would be as if you're inputting Shift+Key. While I doubt many if any have noticed, but it's just a behavioral difference. I personally had made it a habit of quickly doing caps+r+caps in order to do REPLACE instead of replace. No biggie.

2

Re: Search/Replace switches and caps-lock commands

Hi Aaora,

I'm looking at it, there is a bug in the :s logic that causes this (\U \L don't work with submatches, although they do with regular characters and the full \& match repetition). I'll try to fix it quickly and upload a new maintenance build, hopefully later today.

Regarding the Caps Lock issue - you can actually turn the behavior off in Tools|Options|ViEmu. I implemented it because I often press Caps Lock by default and you notice it at the next command, usually in some confusing way. It's on by default (and you are only the 2nd person to complain, so I guess most people appreciate it smile ), but you can easily turn it off to get vi/vim's behavior back

Best regards,

  Jon

3

Re: Search/Replace switches and caps-lock commands

I've fixed the :s problem and uploaded a new build, 2.1.11:

  http://www.viemu.com/ViEmuVS-2.1.11.msi

You need to uninstall the previous version manually before installing this one. Let me know if something doesn't work as expected.

Best regards,

  Jon

4

Re: Search/Replace switches and caps-lock commands

Ah, didn't see that option before. Fantastic!

Thanks,
Akshay

5

Re: Search/Replace switches and caps-lock commands

Tested it out. Working great.
Thanks!
akshay

6

Re: Search/Replace switches and caps-lock commands

For what it's worth, I really appreciate the ViEmu option to ignore caps lock. I wish I could make everything ignore caps lock. I only ever deliberately press that key to turn caps lock OFF. smile

7

Re: Search/Replace switches and caps-lock commands

You can remap it to ESC as described here:

  http://www.viemu.com/forums/viewtopic.php?id=124

I had it set up in my previous computer, I haven't set it up on this one, but I will possibly do it.

I am writing an article describing "why vi is so the killerest", I will hopefully finish it tomorrow. I'll post about it here.

Best regards,

  Jon

8

Re: Search/Replace switches and caps-lock commands

Interesting! I have never considered mapping Caps Lock to Esc, but for vi users, that makes a lot of sense. Thanks for the tip!

9

Re: Search/Replace switches and caps-lock commands

You're welcome, someone else proposed it on the previous topic.

I had the mapping on for some time, but I'm not using it now. I think I find raising the hand to press esc is helpful for me in the end, as I get less finger stress.