Wednesday, July 6, 2011

Re: Vim statusline examples with screenshots?

On 07/07/11 01:03, Jason Timrod wrote:
> Oh - should this matter, I'd prefer this in console Vim and not gvim. Thanks. :)
>
>
> ----- Original Message -----
> From: Jason Timrod<jtimrod@yahoo.com>
> To: "vim_use@googlegroups.com"<vim_use@googlegroups.com>
> Cc:
> Sent: Wednesday, July 6, 2011 10:15 PM
> Subject: Vim statusline examples with screenshots?
>
> Hi all,
>
> I'm curious to know how people pimp their Vim statusline perhaps with useful information? So far, the only thing I've added to it is the current git branch I'm on. Yet I know there's probably other really cool bits of information I'm missing, besides the default..
>
> So, anyone prepared to show their statusline, preferably with a screenshot as well as the config for it?
>
> TIA!
> Jason
>

http://users.skynet.be/antoine.mechelynck/vim/vim-konsole.png

This is not gvim, it is Vim in a konsole terminal (the titlebar and menu
of the konsole terminal are omitted), but resized to lines=47
columns=128, which is what I use, I didn't resize it for the occasion,
and with the CSApprox plugin which gives me a very similar look and feel
in an xterm128 as in gvim. I use it together with my homemade
colorscheme, almost-default.vim

The code for my statusline is as follows:

" custom status line, see :help 'statusline' for details
if has("statusline")
set statusline=%<%f\ %h%m%r%=%k[%{(&fenc\ ==\
\"\"?&enc:&fenc).(&bomb?\",BOM\":\"\")}][U+%04B]\ %-12.(%l,%c%V%)\ %P
endif

In case your mailer (or mine) tried to "beautify" the important line,
there are four lines here, beginning respectively with ", if, set, endif

<lang> near bottom right of the screenshot is what you get with
'iminsert' set to 1 but no keymap; with a keymap active it would be the
"short" keymapname.

The fact that a 7-bit ASCII file is detected as UTF-8 without BOM is
normal: characters U+0000 to U+007F are represented identically for the
same meanings in 7-bit US-ASCII, in most of the ISO 8859 encodings
including Latin1, and in UTF-8; so for such a file it makes no practical
difference which of these is used.

See also
:help 'statusline'
:help option-backslash
http://vim.wikia.com/wiki/Show_fileencoding_and_bomb_in_the_status_line

-- the wiki page above shows an earlier version of this same
'statusline' setting.


Best regards,
Tony.
--
It's lucky you're going so slowly, because you're going in the wrong
direction.

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