Thursday, January 18, 2018

Re: Keystroke command

* Tim Chase (vim@tim.thechases.com) wrote:
> On 2018-01-18 22:41, Gua Chung Lim wrote:
> > :g/^foobar/norm! gUw
>
> For this particular one (replacing a pattern with its uppercase
> version), you can use
>
> :%s/^foobar/\U&
I know this command, but \U is not keystroke.
So it is irrelevant to my question.
For keystroke commands, you can do many other things else,
other than simply change the letter case.

> There's a lot of power in Vim's search-and-replace, so it's worth
> reading up at
> :help sub-replace-special
> and continuing on to read at
> :help :s%
Thank you very much. :-)

--
Gua Chung Lim

To live is to love.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: