Saturday, January 25, 2014

Re: Display current column in statusline

On 1/25/2014 7:25 PM, Marco wrote:
> Hi,
>
> how can I display the current column in the status line?
>
> Having read :h statusline I found %c which looks promising, but it
> counts bytes and not characters. I'd like to have the column
> separated by characters, not bytes. %v works, but only if no tabs
> are being used. Here an example:
>
> 123 56789
> "äå µåäö"
>
> I'd like to display the number indicated in the first column. The
> following works for the first to third column until the tabs come
> into play.
>
> :set statusline=%v
>
> The following works only for the first line, but not the second one.
>
> :set statusline=%c
>
> VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Oct 9 2013 04:13:14)
> Included patches: 1-52
>
> Marco
>
set statusline=%t%m%r%h%w\ %{&ff}\ %Y\ dec/hex\ \%03.3b/\%02.2B\ line\
%l\ col\ %c%V\ of\ %L\ lines\ %p%%
yields
.vimrc unix VIM dec/hex 115/73 line 50 col 1 of 634 lines 7%

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: