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