Re: Vim Help for deleting alternate lines in text

2007-03-30 Thread Auro Ashish Saha
Hello Antoine,

Thanks for your post. I tried both the options but i could not get any
result. I am using gvim. Please help.

Regards,

Auro Ashish Saha.
> Auro Ashish Saha wrote:
>> Hello,
>>
>> Please help me to remove alternate lines from a text file.
>>
>> 00 0
>> 123456 9
>> 99 9
>> 123445 9
>>
>> I want to delete the line 1, 3, 5 and so on. What are the commands to be
>> used. Thanks for help in advance.
>>
>> Regards,
>>
>> Auro Ashish Saha.
>>
>>
>>
>
> Method I:
>
>   q"ddjjq
>   @"
>
> where  is equal to the number of lines still to be deleted
>
> Method II (all on one line if typed on the Vim command-line):
>
>  :let i=1 | while i <= line('$') | if (i % 2) | exe i . "delete" |
> endif |
> endwhile
>
>
> Best regards,
> Tony.
> --
> Idaho state law makes it illegal for a man to give his sweetheart a box
> of candy weighing less than fifty pounds.
>


-- 
Auro Ashish Saha
QIP Ph.D. Research Scholar
Suman Mashruwala Laboratory
Mechanical Engineering Department
IIT Bombay, Powai
Mumbai - 400 076
India


Mobile: 09969074835

Email: [EMAIL PROTECTED]
   [EMAIL PROTECTED]




Re: Vim Help for deleting alternate lines in text

2007-03-30 Thread Auro Ashish Saha
Hello,

Please help me to remove alternate lines from a text file.

00 0
123456 9
99 9
123445 9

I want to delete the line 1, 3, 5 and so on. What are the commands to be
used. Thanks for help in advance.

Regards,

Auro Ashish Saha.





Vim Help for deleting text

2007-03-19 Thread Auro Ashish Saha
Hello,

I would like to remove everything after a text highlight in a line for
all the lines in a file.

What are the commands to be used in Vim. I would appreciate your help.

00,000,00
00,000,00

I want to remove everything after "," for all the lines.

Regards,

Auro Ashish Saha.