Tuesday, March 27, 2012

Re: Horizontal Ruler in interface?

On Tue, March 27, 2012 09:46, rameo wrote:
> On Sunday, March 25, 2012 12:21:43 PM UTC+2, coot_. wrote:
>> > > 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
>> >
>> > If you don't want the first line this should work for you:
>> > nmap \ru :2new +set\ buftype=nofile\ nomod Ruler<CR>:%d
>> _<CR>8i123456789*<Esc><CR>:winc j<CR>
>> >
>> > If you want the ruler to be longer change 8 to a higher value.
>> >
>> > Best,
>> > Marcin
>>
>> Small update (the buffer might have just one line):
>> nmap \ru :1new +set\ buftype=nofile\ nomod Ruler<CR>:%d
>> _<CR>8i123456789*<Esc><CR>:winc j<CR>
>>
>> Best,
>> Marcin
>
>
> Thank you Marcin + Christian,
> Now I understand what the 1st line was: the decimals.
> However they were not places at the correct place
>
> This is what I see when I use the 2 line version:
> 1 2 3 4 5 6 7 8
> 12345678901234567890123456789012345678901234567890123456789012345678901234567890
>
> This is what it has to be (isn't it?:
> 1 2 3 4 5 6 7
> 8
> 12345678901234567890123456789012345678901234567890123456789012345678901234567890
> How can I change the 2 line version in order to obtain above result?
not enought spaces in the :s/ call

try this (just throw into your .vim/plugin folder and restart vim):
fu! HorRuler()
setl nowrap scrollbind scrollopt+=hor
abo 2sp +enew
call setline(2,repeat('123456789*',100))
call setline(1,repeat('123456789*',10))
:1s/./ &/g
let &l:stl="%#Normal#".repeat(' ',winwidth(0))
setl scrollbind nomod buftype=nofile nowrap winfixheight
wincmd p
endfu
com! HorizontalRuler :call HorRuler()

regards,
Christian

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

Post a Comment