Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 3 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 at 17:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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