Tip #801: Folding of (gnu)make output
tip karma |
Rating 10/4, Viewed by 294
|
created: |
|
October 5, 2004 8:37 |
|
complexity: |
|
basic |
author: |
|
Jonas Lööf |
|
as of Vim: |
|
5.7 |
I regularly use the compiler output window of the QuickFix feature (see help on 'quickfix' and 'copen') to navigate the compiler output. Working on a largish software system with multiple directories with subdirectories in them, the list can get quite long. I use the following entries in my .vimrc to automatically fold on each subdirectory, and open folds containing errors (the string 'error:'). Aditionally 'zw' open also the folds containing the string 'warning:', while 'zq' switches back to the original.
"Folding of (gnu)make output
au BufReadPost quickfix setlocal foldmethod=marker
au BufReadPost quickfix setlocal foldmarker=Entering\ directory,Leaving\ directory
au BufReadPost quickfix map <buffer> <silent> zq zM:g/error:/normal zv<cr>
au BufReadPost quickfix map <buffer> <silent> zw zq:g/warning:/normal zv<cr>
au BufReadPost quickfix normal zq
<<Sorting lines in a file based on the number of words in each line |
Specify what you do not want to have in a search and other helpful searches. >>
Additional Notes
|