> I have these lines,
> UniqueID2 = lview.focusedItem.subItems.opIndex(0).text;
> Parent = lview.focusedItem.subItems.opIndex(0).text;
> Children = lview.focusedItem.subItems.opIndex(0).text;
> login = lview.focusedItem.subItems.opIndex(1).text;
> txtCust.text = lview.focusedItem.subItems.opIndex(2).text;
> txtProj.text = lview.focusedItem.subItems.opIndex(3).text;
> txtbDate.text = lview.focusedItem.subItems.opIndex(4).text;
> txtdDate.text = lview.focusedItem.subItems.opIndex(5).text;
> txteDate.text = lview.focusedItem.subItems.opIndex(6).text;
> txtPM.text = lview.focusedItem.subItems.opIndex(7).text;
> txtLang.text = lview.focusedItem.subItems.opIndex(8).text;
> txtVendor.text = lview.focusedItem.subItems.opIndex(9).text;
> txtInvoice.text = lview.focusedItem.subItems.opIndex(10).text;
> txtPMFund.text = lview.focusedItem.subItems.opIndex(11).text;
> txtProjFund.text= lview.focusedItem.subItems.opIndex(12).text;
> txtA_No.text = lview.focusedItem.subItems.opIndex(13).text;
> txtNotes.text = lview.focusedItem.subItems.opIndex(14).text;
> txtStatus.text = lview.focusedItem.subItems.opIndex(15).text;
>
> and I would like to replace the number between the parens () to a sequential
> number starting from 0. ie,
If you highlight the lines in question and issue the following:
:'<,'>s/opIndex(\zs\d\+\ze)/\=line('.')-line("'<")
It should renumber them starting at zero for you.
I'd be glad to explain what that's doing if you have trouble
un-opaquifying it :)
-tim