On Jul 17, 8:40 am, David Fishburn <[email protected]> wrote:
>
> I wonder if my plugin:
>
> SrchRplcHiGrp.vim : Search and/or replace based on a syntax highlight
> grouphttp://www.vim.org/scripts/script.php?script_id=848
>
> Could be used in this case.
> If not, I would be willing to look into how it doesn't meet your needs
> and make some changes.
>
> I think it should do what you want though.
>
I'm actually just asking out of a desire to learn more about Vim...I
currently have no need for this functionality (though if I do I'll
take a look at the plugin). I don't currently have time to look in
detail at the script, but at a glance it looks like you move the
cursor around. Do you move the cursor to make sure the syntax group at
the cursor is the syntax group you're interested in, or for some other
reason (I saw a bunch of "restore the cursor" comments)?
I would really like to know whether line('.') and col('.') and
possibly other functions acting on "current cursor position" will work
in a sub-replace-expression by design, or whether I was just lucky.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---