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
Hi all,
TIA!
Jason
--
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
Here's mine. Config is also in the screenshot.
http://imagebin.org/161837
--
Ivan Sichmann Freitas
GNU/Linux user #509059
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.
Mine shows 21 items in logical groupings that are still easily
readable. A number of these features are particular to our
customization, but all are extrapolations of basic Vim capabilities:
http://cream.sourceforge.net/statusline.html
What I like most is that fields and lengths don't change. All the
indicators stay in the same spot, respective states are indicated by
highlight. (Like lights on a dashboard.)
--
Steve Hall [ digitect dancingpaper com ]
Here's [0] mine. Note the different statuslines for active/inactive windows.
Code on github [1].
[0]: http://i.japh.se/vim.png
[1]: http://github.com/trapd00r/configs/blob/master/vim/after/plugin/statusline.vim
--
│ Magnus Woldrich
│ m...@japh.se
│ http://japh.se
I've done a completion mode indicator with the statusline, it indicates
which one of the 15 completion modes you're in when you type, here's the
link: http://bluegene8210.is-programmer.com/posts/27873.html text was in
Chinese but there are several screenshots where you can see what I'm talking
about. It's the most complex and funny thing I've done so far with the
statusline.
As for the vim/gvim issue, I believe they differ only when the coloring
features are concerned, e.g you can't use custom color like '#233b5a' in the
statusline with console vim, as I used in my codes.
--
View this message in context: http://vim.1045645.n5.nabble.com/Vim-statusline-examples-with-screenshots-tp4559125p4561904.html
Sent from the Vim - General mailing list archive at Nabble.com.
Mine shows 21 items in logical groupings that are still easily
readable. A number of these features are particular to our
customization, but all are extrapolations of basic Vim capabilities:
http://cream.sourceforge.net/statusline.html
What I like most is that fields and lengths don't change. All the
indicators stay in the same spot, respective states are indicated by
highlight. (Like lights on a dashboard.)
On Thu, Jul 7, 2011 at 05:11, Steve Hall wrote:
> Mine shows 21 items in logical groupings that are still easily
> readable. A number of these features are particular to our
> customization, but all are extrapolations of basic Vim capabilities:
>
> http://cream.sourceforge.net/statusline.html
How do you get the file size? That's a useful information I could add
to my own status line.
Cool thanks, I didn't know about that one.
We keep our code here:
http://cream.cvs.sourceforge.net/viewvc/cream/cream/cream-statusline.vim?view=log
I believe it is modular enough to function by itself (just source the
file). A few of the items require Cream environment-specific globals,
but these should fail quietly.
You can tweak it a little to handle empty buffers and group numbers
(below
with US commas, change to taste).
1:function! Cream_statusline_bufsize()
2: let bufsize = line2byte(line("$") + 1) - 1
3: " prevent negative numbers (non-existant buffers)
4: if bufsize < 0
5: let bufsize = 0
6: endif
7: " add commas
8: let remain = bufsize
9: let bufsize = ""
10: while strlen(remain) > 3
11: let bufsize = ",".strpart(remain, strlen(remain) - 3).bufsize
12: let remain = strpart(remain, 0, strlen(remain) - 3)
13: endwhile
14: let bufsize = remain . bufsize
15: " too bad we can't use (nr2char(1068)) :)
16: let char = "b"
17: return bufsize . char
18:endfunction
We use an incorrect "b" to indicate bytes to better distinguish it
from numbers.
Here is mine:
Screenshot: http://dominique.pelle.free.fr/pic/vim-statusline.png
vimrc: http://dominique.pelle.free.fr/.vimrc.html
Status line shows:
- buffer number/buffer count
- file name
- flags ([RO], etc.)
- file type
- file encoding + BOM
- file format (dos, unix, mac)
- spell language
- current function name
- name of syntax group under cursor
- utf-8 sequence under cursor (displayed for non ascii char only)
- Unicode code point of character under cursor (U+xxxx)
- cursor position (current line / total line count, column, % in file)
-- Dominique
I have a video :) the ATP plugin (which I'm maintaining) has a statusline with
progress bar info, here's the link
http://atp-vim.sourceforge.net/videos.shtml
(look at the PROGRESS BAR video)
Best,
Marcin Szamotulski
Thank you to every one who's replied -- it's been really useful. When I put something together which suits me, based on all these wonderful suggestions, I'll let people know!
Thanks!
Jason
----- Original Message -----
From: Marcin Szamotulski <msz...@gmail.com>
To: vim...@googlegroups.com
Cc:
Sent: Friday, July 8, 2011 10:05 PM
Subject: Re: Vim statusline examples with screenshots?
Hi all,
I have a video :) the ATP plugin (which I'm maintaining) has a statusline with
progress bar info, here's the link
http://atp-vim.sourceforge.net/videos.shtml
(look at the PROGRESS BAR video)
Best,
Marcin Szamotulski