Hi,
Gautier DI FOLCO schrieb:
> Hi,
>
> Le 20 mars 2012 07:25, Jürgen Krämer <[email protected]
> <mailto:[email protected]>> a écrit :
>
> sorry, but I don't understand your explanation.
>
> sorry, I do not have a good mastery of English.
no problem.
> Here is an example without those special characters:
>
> hi User4 ctermfg=yellow guifg=yellow
> hi User7 ctermfg=red guifg=red
> hi User8 ctermfg=green guifg=green
> set statusline=%f\ %7*%{&modified?'X':''}%8*%{&modified?'':'V'}\
> %4*%{&encoding}
>
> With an unmodified, new buffer this results in a status line with
> "[No Name]" highlighted with the current values for :hi StatusLine,
> a green "X" and the encoding in yellow.
>
> After creating a new buffer and changing it I see a red "X" in the
> status line of the new buffer; the status line of the first buffer
> still has a green "V". Creating and editing buffers and switching
> between them always gives red "X"s for modified und green "V"s for
> unmodified buffers.
>
> Do you see the same? Do you expect a different display?
>
>
> With my current .vimrc, which do want I want :
> +---+
> |123|
> +---+
>
> unmodified :
> * 1 : Empty character and Style 8
> * 2 : V character and Style 8
> * 3 : Empty character and Style 8
>
> modified :
> * 1 : Empty character and Style 7
> * 2 : X character and Style 7
> * 3 : Empty character and Style 7
>
> With your configuration :
>
> +--+
> |12|
> +--+
>
> unmodified :
> * 1 : V character and Style 8
> * 2 : Empty character and Style 8
>
> modified :
> * 1 : X character and Style 7
> * 2 : Empty character and Style 8
>
> Is my explanation more understandable now? (I can try to reformulate)
So you are only missing the spaces before V and X, respectively? I
thought they were just an oversight, because there already was a space
before the switch to User7 and User8, so I left them out.
Is this better now
hi User4 ctermfg=yellow guifg=yellow
hi User7 ctermfg=red guifg=red
hi User8 ctermfg=green guifg=green
set statusline=%f\ %7*%{&modified?'\ X':''}%8*%{&modified?'':'\ V'}\
%4*%{&encoding}
?
Apart from the missing space: is the behaviour on switching buffers
the way you wanted it?
Regards,
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