Monday, September 13, 2010

Re: Mark selection for replace

Hi,

if you use visual mode to select something and go to the command line
you will see it open with :'<,'> which is from and to your visual
selection. You could do a :'<,'>s// to do a replace on that section.

gr,

Tom

On Mon, Sep 13, 2010 at 3:25 PM, Dotan Cohen <dotancohen@gmail.com> wrote:
> How does one mark a selection for search / replace in VIM?
>
> In Kate (KDE editor) one can select an arbitrary block of text ands
> perform a search / replace option only in that block. So, for instance
> if I have two functions which both use the local variable "input" then
> I could easily mark || highlight || select one of them, then search
> and replace the text only in that section.
>
> By the way, while googling this I see alternating use between the
> words "find" and "search". Are the two words synonyms in this context,
> or are amateur journalists (bloggers) getting them confused (not
> restricted to the VIM community)?
>
> Thanks!
>
> --
> Dotan Cohen
>
> http://gibberish.co.il
> http://what-is-what.com
>
> --
> 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 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

No comments:

Post a Comment