0

I use syntastic plugin for vim on a computer with small screen, so want to cut out the unnecessary space. But, syntastic, when there's an error, displays e.g.:

[Syntax: line: 5 (1)]
a.cpp|5 col 59 warning|some error
[Location List] :SyntasticCheck gcc (cpp)
Vim status bar

Is is possible to remove the status line ([Syntax: line...) and the last line ([Location List...), which I don't necessarily need? I tried disabling the loclist altogether (then I see the warnings/errors in the vim status bar), but I cannot scroll status bar, when it's too long -- but maybe it is possible?

Before turning on loclist: no loclist

After:

with loclist on

Here I have already removed the statusline formatting string from my ~\.vimrc. I would like the loclist to occupy one extra line, now it takes 3.

Community
  • 1
  • 1
sygi
  • 4,557
  • 2
  • 32
  • 54

4 Answers4

1

What you need is to hide the statusbar.

Take a look at this post, which implements a function to toggle that functionality.

Or, to disable it altogether:

set noshowmode
set noruler
set laststatus=
set noshowcmd
Community
  • 1
  • 1
thalesmello
  • 3,301
  • 3
  • 20
  • 20
  • Thank you for your answer. The example you gave doesn't compile (laststatus need a number) and disables only one of the two extra lines. – sygi Mar 09 '17 at 23:35
1

I think the it's not possible to entirely solve the problem that I asked for, as the loclist is considered another vim window and as such, the first extra line is a mandatory status line of the main window. One can disable the second extra line though by passing:

set laststatus=0
sygi
  • 4,557
  • 2
  • 32
  • 54
0

To disable the status bar (the top bars, not the bottom line with format '%d' ...)

Supposedly set laststatus=0 should work. However I noticed this was not working in my vimrc but would work if set manually for each vim session.

To resolve this issue, I added an autocmd within my .vimrc to override any existing laststatus setting:

# ~/.vimrc

" Hide Status Line
set laststatus=0 " For some reason this doesnt work
autocmd BufRead,BufNewFile * set laststatus=0 " This will work instead
Weston Ganger
  • 6,324
  • 4
  • 41
  • 39
0

As Weston Ganger said, laststatus=0 may not work in the vimrc file. In my case, the reason was in the vim-airline plugin. As stated in https://bbs.archlinux.org/viewtopic.php?id=241303, in airline.vim has a line set laststatus=2, which just needs to be corrected to set laststatus=0.

A A
  • 1
  • 1