5

I'm using Vim 8, and my status line is missing.

I type in:

set statusline=%f

...and hit Enter, and nothing seems to happen. Once I do some moving or editing, what I just typed in disappears, and still no statusline.

I know I had a statusline at one point... how do I get it back?

1
  • 1
    :set laststatus=2 will always display the statusline.
    – Arminius
    Jan 6, 2017 at 20:37

1 Answer 1

7

Your statusline depends on statusline for "what" to display on the status line.

See :h statusline

But you also have an option to control "when" to display the status line:

From :h laststatus:

The value of this option influences when the last window will have a
status line:
    0: never
    1: only if there are at least two windows
    2: always

So in your case you had the setting equal to 1, so the status bar would be displayed only when two or more windows are on screen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.