Friday, July 20, 2012

Re: Remove spaces and line breaks and make single line wihtout spaces

Hi,

Am 20.07.2012 11:09 schrieb "vicky b" <vickyb2084@gmail.com>:
>
> HI,
>
>   I dint find  any specific solution for my problem even after much of googling
>
> i have following line 
>
> <?xml version="1.0" encoding="UTF-8"?><SupportItem>   
> <ItemInfo>   
> <Name>First Name</Name>   
> <Type>INPUTEXT</Type>   
> <Value></Value>   
> <Mandatory>true</Mandatory>   
> <Description></Description>   
> <ImagePath></ImagePath>  
> <MaxLength>100</MaxLength>   
> </ItemInfo>   
> </SupportItem>
>
> i want to have it as below all line merged as single line and no spaces at all
>
> <?xmlversion="1.0"encoding="UTF-8"?><SupportItem><ItemInfo><Name>FirstName</Name><Type>INPUTEXT</Type><Value></Value><Mandatory>true</Mandatory<Description></Description><ImagePath></ImagePath><MaxLength>100</MaxLength></SupportItem>

:%s/\n\s*//

should do it.

Regards,
Jürgen

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

No comments: