Re: auto upper/lower in replace pattern based on search pattern?

2006-07-13 Thread Marshall Abrams
Thanks--keepcase.vim is great. So now with :%s/firstname/\=KeepCase(submatch(0), 'LastName')/ig I can replace all instances of firstname with lastname firstName with lastName FirstName with LastName But \=KeepCase(submatch(0), '') is a mouthful. Not a problem; tha

Re: auto upper/lower in replace pattern based on search pattern?

2006-07-07 Thread Yakov Lerner
On 7/7/06, Marshall Abrams <[EMAIL PROTECTED]> wrote: Hate to ask this because I'm sure the answer is already out there somewhere, but I've searched help and vim.org until I was blue in the fingers I could swear that I remember from a few years back that there's a way to do this. Can't reme

auto upper/lower in replace pattern based on search pattern?

2006-07-06 Thread Marshall Abrams
Hate to ask this because I'm sure the answer is already out there somewhere, but I've searched help and vim.org until I was blue in the fingers I could swear that I remember from a few years back that there's a way to do this. Can't remember whether it required something special in the pa