Friday, July 20, 2012

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


On 20 Jul 2012 11:30, "Dominique Pellé" <dominique.pelle@gmail.com> wrote:
>
> Jürgen Krämer <jkr@habel.de> wrote:
>
> > 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
>
> I think you meant this:
>
> :%s/\s*\n/
>
> ... since the spaces are before \n.
>
> -- Dominique

No, at least in gmail the file seems to have whitespace at the beginning of lines (indentation).

Nico

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

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