Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm have the following makeprg to compile my tex files in vim:

setlocal makeprg=pdflatex\ \-file\-line\-error\ \-shell\-escape\ \-interaction=nonstopmode\ $*\\\|\ tee\ \/dev\/tty\ \\\|\ grep\ \-P\ ':\\d{1,5}:\ '

which gives me good results (errors displayed properly, tex compilation shown while busy,...)

Yet there is one thing I'm not pleased off: when there are errors and the quickfix window pops up, its status bar is cluttered up with the makeprg string:

pdflatex\ \-file\-line\-error\ \-shell\-escape\ \-interaction=nonstopmode\ $*\\\|\ tee\ \/dev\/tty\ \\\|\ grep\ \-P\ ':\\d{1,5}:\ '

Is there a way of changing the quickfix title/statusbar?

share|improve this question
up vote 4 down vote accepted

A little digging and experimentation revealed that the 'statusline' of a quickfix window is set to

%t%{exists('w:quickfix_title')? ' '.w:quickfix_title : ''}

Unfortunately, the w:quickfix_title variable isn't defined until some time after the quickfix buffer and window are created, so you can't use an autocommand to undefine (:unlet) or set the value of w:quickfix_title. However, you can use an autocommand to set the value of 'statusline', so putting this in your ~/.vimrc should fix the problem.

au BufWinEnter quickfix setl statusline=%t
share|improve this answer
    
I found this helpful, and used it to set a cleaner statusline. Unfortunately when paging through earlier quickfix lists with :colder and :cnewer the ugly titles got restored again! So I finally wrote this helper to preserve the cleaner statuslines: github.com/joeytwiddle/rc_files/commit/… I hope it may be useful to plugin authors! – joeytwiddle Jan 13 '14 at 17:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .