Questions tagged [statusline]

A status line will be used to separate windows. Questions about how to format and change the content of this status line.

Filter by
Sorted by
Tagged with
10
votes
1answer
2k views

Why do custom highlights in my vimrc get cleared or reset to default?

I would like to highlight (part of) my statusline with %1*, for example: set statusline=%1*%f%0* highlight User1 ctermbg=0 ctermfg=10 cterm=bold However, this always shows up as "empty" (the default ...
129
votes
10answers
66k views

How can I see the full path of the current file?

When I'm editing a file in Vim, is there a command to see the path of the current file? Sometimes this is very handy if there are multiple files with the same name in a project.
7
votes
1answer
321 views

Display current subroutine/subprogram in statusline

I am currently coding fortran, and I have huge "subprograms" (called "subroutine" in fortran). So I would like the name of the current subroutine (the subprogram my cursor is currently in) to be ...
6
votes
1answer
489 views

Hide statusline when more than two windows open without suffering the extra hidden empty line artifact?

I want to hide the statusline, I don't ever use nor care about what is written in it. The problem is vim doesn't offer a way to achieve that in a convenient manner. If I just do set laststatus=0 I ...
36
votes
1answer
6k views

See the Unicode code point of the current character

How can I see the Unicode code point of the character where the cursor is? For example, if my cursor is on a ⌘ character, I'd like Vim to tell me that it is U+2318. Alternative information, such as ...
11
votes
1answer
7k views

Jumping to a byte offset, and displaying position as byte offset

How can I move the cursor to the nth byte in the buffer? How can I display the current cursor position in the ruler in terms of the byte offset, rather than lines and columns? (Follow-up question: ...
2
votes
1answer
174 views

How to get the current mode in vim?

I'm writting scripts for vim, and I want to let the script do different things in different mode. I know that the statusline will show the current mode, but I don't know how to get the exact current ...