rking / ag.vim

Vim plugin for the_silver_searcher, 'ag', a replacement for the Perl module / CLI script 'ack'
1.74k stars 131 forks source link

Option to resize quickfix list #20

Closed npearson72 closed 10 years ago

npearson72 commented 11 years ago

Would love it if I can have a larger window

losingkeys commented 11 years ago

Like an option to set the default height? This is certainly doable, and I don't think it's supported by a vim option at the moment. Also, you might be able to achieve this by changing g:ag_chandler and/or g:ag_lhandler.

npearson72 commented 11 years ago

Try this.. it's what I use and works ok:

au FileType qf call AdjustWindowHeight(3, 30) function! AdjustWindowHeight(minheight, maxheight) exe max([min([line("$"), a:maxheight]), a:minheight]) . "wincmd _" endfunction

losingkeys commented 10 years ago

You can do this with g:ag_qhandler. You could provide a height for :copen, e.g.:

let g:ag_qhandler="copen 30"

makes the quickfix window a lot bigger when opening it. Let me know if this doesn't work for you, & cheers!