On 09/02/11 09:13, Vítor De Araújo wrote:
Hello!

Is there a way to force the ruler to show at the bottom line, even when
there is a statusline present?

Thanks in advance.





If you set 'laststatus' to 0 (zero), the bottom window will never have a status line, even if there are other split-windows visible. In that case, if 'ruler' is on, the ruler for the bottom window (which is not necessarily the current window) will be displayed at the bottom of the screen. The absence of the bottom status line also means, of course, that any window *except the bottom one* can be made current by clicking its status line with the mouse.

Alternately, with the following settings:

        :set ru        " ruler on
        :set stl=      " 'statusline' empty, default status line
        :set ls=2      " 'laststatus' set to 2, every window has a st.l.

*every* status line will include, near its right end, the ruler for its own window (the default ruler if 'rulerformat' is empty, or whatever ruler it specifies if it is not empty). If you use a custom status line, then of course it's up to you to include in it whatever the ruler would provide: for instance, I use the following (four lines, the third one is quite long):

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

which includes (IIUC) everything that is in the default statusline with default ruler, and a few additional bits such as the current disk file's encoding and BOM settings ('fenc' if not empty, 'enc' if 'fenc' is empty, and also ,BOM if 'bomb' is set or nothing for 'nobomb') as well as the hex value of the Unicode codepoint at the cursor. Notice the escaping backslashes (see ":help option-backslash") and the use of the condition?iftrue:iffalse ternary operator (see ":help expr1").


Best regards,
Tony.
--
A physicist is an atom's way of knowing about atoms.
                -- George Wald

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

Reply via email to