About: Automatically fitting a quickfix window height   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

So I wrote the following code in my vimrc. With it, a quickfix window height is automatically adjusted to fit its contents (maximum 10 lines). au FileType qf call AdjustWindowHeight(3, 10) function! AdjustWindowHeight(minheight, maxheight) exe max([min([line("$"), a:maxheight]), a:minheight]) . "wincmd _" endfunction Of course, this function can be applied to other windows besides the quickfix window. If you feel it's too tight, you may want to replace line("$") with line("$")+1.

AttributesValues
rdfs:label
  • Automatically fitting a quickfix window height
rdfs:comment
  • So I wrote the following code in my vimrc. With it, a quickfix window height is automatically adjusted to fit its contents (maximum 10 lines). au FileType qf call AdjustWindowHeight(3, 10) function! AdjustWindowHeight(minheight, maxheight) exe max([min([line("$"), a:maxheight]), a:minheight]) . "wincmd _" endfunction Of course, this function can be applied to other windows besides the quickfix window. If you feel it's too tight, you may want to replace line("$") with line("$")+1.
Version
  • 6(xsd:integer)
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 1535(xsd:integer)
Category
  • Compiler
Author
  • AOYAMA Shotaro
Subpage
  • /200712
Complexity
  • basic
Created
  • 2007(xsd:integer)
ID
  • 1536(xsd:integer)
NEXT
  • 1538(xsd:integer)
abstract
  • So I wrote the following code in my vimrc. With it, a quickfix window height is automatically adjusted to fit its contents (maximum 10 lines). au FileType qf call AdjustWindowHeight(3, 10) function! AdjustWindowHeight(minheight, maxheight) exe max([min([line("$"), a:maxheight]), a:minheight]) . "wincmd _" endfunction Of course, this function can be applied to other windows besides the quickfix window. If you feel it's too tight, you may want to replace line("$") with line("$")+1.
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software