Re: How to split multiple CSS rules into one line each?

2009-03-26 Thread Tony Mechelynck
On 26/03/09 07:20, Leandro N. Camargo wrote: > > Now, what if I want to do the reverse, tranforming this: > > a.anything { >color:#eee; >display:block; >width:300px; > } > > onto this: > > a.anything {color:#eee;display:block;width:300px;} > > ??? > > All the best, > Leandro. > What a

Re: How to split multiple CSS rules into one line each?

2009-03-26 Thread Maxim Kim
On 26 мар, 09:56, Maxim Kim wrote: > Try > g/[;}]\s*$/-1j > > It works for me with: > a.anything { > color:#eee; > display:block; > width:300px;} > > a.anything { > color:#eee; > display:block; > width:300px; > > } Result: a.anything { color:#eee; display:block; width:300px; } a.anyt

Re: How to split multiple CSS rules into one line each?

2009-03-25 Thread Maxim Kim
On 26 мар, 09:20, "Leandro N. Camargo" wrote: > Now, what if I want to do the reverse, tranforming this: > > a.anything { >   color:#eee; >   display:block; >   width:300px; > > } > > onto this: > > a.anything {color:#eee;display:block;width:300px;} > > ??? Try g/[;}]\s*$/-1j It works for me wi

Re: How to split multiple CSS rules into one line each?

2009-03-25 Thread Leandro N. Camargo
Now, what if I want to do the reverse, tranforming this: a.anything { color:#eee; display:block; width:300px; } onto this: a.anything {color:#eee;display:block;width:300px;} ??? All the best, Leandro. On 21 fev, 15:04, Tim Chase wrote: > > I guess the title is pretty much self-explana

Re: How to split multiple CSS rules into one line each?

2009-02-21 Thread Tim Chase
> Speaking of VIM patterns, it seems vim doesn't support conditional > expression patterns, only in perl. > Anyone has any tip/workaround for that fro vim regexp? I'm not sure what "conditional expression patterns" are in Perl. For more convoluted regexp logic, you'll find Dr. Chip's "LogiPat

Re: How to split multiple CSS rules into one line each?

2009-02-21 Thread Leandro Camargo
Speaking of VIM patterns, it seems vim doesn't support conditional expression patterns, only in perl. Anyone has any tip/workaround for that fro vim regexp? Thnaks! On Sat, Feb 21, 2009 at 7:42 PM, Leandro Camargo wrote: > Wow, thanks Tim! It works fine, except by the case when the last rule >

Re: How to split multiple CSS rules into one line each?

2009-02-21 Thread Leandro Camargo
Wow, thanks Tim! It works fine, except by the case when the last rule doesn't have a semicolon in the end. So I tried to add (?=) perl alike feature in your pattern to make it work and I made it. So, the final pattern I came up with is this one: :s/\([{;]\|}\&\)\s*/\1\r /g Just added the \|}\& a

Re: How to split multiple CSS rules into one line each?

2009-02-21 Thread Tim Chase
> I guess the title is pretty much self-explanatory. > But I'll give an example of what I want. Assume I have this line: > > a.anything {color:#eee;display:block;width:300px;} > > So, I want to split this above line into this: > > a.anything { > color:#eee; > display:block; > width:300px;

How to split multiple CSS rules into one line each?

2009-02-21 Thread Leandro Camargo
I guess the title is pretty much self-explanatory. But I'll give an example of what I want. Assume I have this line: a.anything {color:#eee;display:block;width:300px;} So, I want to split this above line into this: a.anything { color:#eee; display:block; width:300px; } So, what is the b