Wednesday, June 2, 2010

Re: Different center alignment

Hi,

Christian Brabandt wrote:
> On Wed, June 2, 2010 1:30 pm, Jürgen Krämer wrote:
>> The replacement text
>>
>> \=submatch(1) . repeat(' ', &tw ? &tw : &wm ? winwidth(0) - &wm :
>> winwidth(0) - len(submatch(1)) - len(submatch(2))) . submatch(2)
>>
>
> Shouldn't that be something like that
> \=submatch(1) . repeat(' ', (&tw ? &tw : &wm ? winwidth(0) - &wm :
> winwidth(0)) - len(submatch(1)) - len(submatch(2))) . submatch(2)
>
> (note that added paranthesis...)

yes, you are right. I had first tested this with a temporary variable
that held the result of "&tw ? &tw : &wm ? winwidth(0) - &wm : winwidth(0)"
and did not test again after inserting this into the replacement expression.

Thanks,
Jürgen

--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)

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