Reputation: 953
I am programming in vim and python, and use tpope's vim-dispatch to run the current file via
:Dispatch python main.py
The printed output from the program is directed into the quickfix window. Unfortunately, only the first couple of lines are visible. To see all of the output, I must resize the quickfix window manually.
My laborious workaround so far, after moving the cursor to the quickfix window, is <C-W><C-o>
, which makes the quickfix window the only window visible.
I then go back to my source via <C-o>
.
Is there a way to toggle a specific size of the quickfix window? Alternatively: What would be a better way to navigate to the quickfix window, maximize it, and then go back to the last position in the source?
Upvotes: 1
Views: 1466
Reputation: 172590
The :copen
command supports an optional [height]
argument:
:cope[n] [height] Open a window to show the current list of errors. When [height] is given, the window becomes that high (if there is room). When [height] is omitted the window is made ten lines high.
If quickfix is opened by the plugin (and you cannot configure this), you could work around this via an :autocmd
(as the quickfix window can be detected by its qf
filetype):
:autocmd FileType qf wincmd _
Upvotes: 3