On 12/30/2010 10:41 PM, sergio wrote:
On 12/31/2010 06:13 AM, David Fishburn wrote:

As Chip mentioned, I definitely want to know of any bugs.

1)
I've not understand how to select highlight group from script.
(For example I need to select zoneSerial group)

2)
% vim bindzone
:source incoming/srhg/plugin/SrchRplcHiGrp.vim
<GOTO zone serial>
:SRChooseHiGrp
SRHiGrp - Group ID: 97  Name: zoneSerial
:SRHiGrp '\(.*\)','__\1__'
.* also includes comment, that exists on this line: so I get:
__2007031901 ; serial__
instead of:
__2007031901__ ; serial


This one is tough.

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

Since you said .*, that means until the end of the line.

I think what you wanted to do in your case was simply:
:SRHiGrp '\(\w\+\)','__\1__'
or
:SRHiGrp '\(\d\+\)','__\1__'

This took care of the entire file:
:%SRHiGrp '\(\d\+\)','__\1__'


3)
<GOTO ip address>
:SRChooseHiGrp
SRHiGrp - Group ID: 94  Name: zoneIPAddr
:SRSearch
goes to the next octet of selected ip address, not to the next ip address.

<GOTO zoneDirective>
:SRChooseHiGrp
SRHiGrp - Group ID: 89  Name: zoneDirective
:SRSearch
first SRSearch (from neutral space) goes to '$' of next directive,
second --- to the first letter after $ of the same directive.

I agree.

I have uploaded a new version 5.0 to address this.
http://www.vim.org/scripts/script.php?script_id=848

Please provide further feedback if you have more.
Dave

--
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

Reply via email to