Loading ...
Sorry, an error occurred while loading the content.

119912Re: Substitute within a highlight group.

Expand Messages
  • sergio
    Jan 1, 2011
    • 0 Attachment
      On 01/01/2011 11:03 PM, David Fishburn wrote:

      > What the plugin does, it is positions the cursor to the required
      > highlight group and then runs Vim's standard regex.
      I guessed.

      > This took care of the entire file:
      > :%SRHiGrp '\(\d\+\)','__\1__'
      Yes, in my case this will work fine.
      But what if group may have spaces?
      some c code /* comment with spaces */ some c code;
      And you want to remove this comment? Or something else.
      Of course you can write something like this:
      :%SRHiGrp '\/\*.*\{-}\/\*',''
      But this only adds difficulty to regex and makes it dependent on case.
      I know, this is dumb example, but I can't find good one.

      > I have uploaded a new version 5.0 to address this.
      > http://www.vim.org/scripts/script.php?script_id=848
      Thank you. Now search works good.

      And how to select group for replace from script (without cursor


      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
    • Show all 19 messages in this topic