6

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?

Aaron Thomas
  • 355
  • 1
  • 4
  • 8

1 Answers1

9

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.

nobe4
  • 16,033
  • 4
  • 48
  • 81