Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to open Quickfix window automatically after make

📅 2015-Mar-21 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ make, quickfix, vim ⬩ 📚 Archive

The Quickfix feature of Vim can be used to view errors or warnings produced by a compilation in a window and jump to those locations in source files. The Quickfix window has to be manually opened using :copen. Instead, I like the Quickfix window to be automatically opened after running a :make.

This can be done by adding these line to .vimrc:

" Open Quickfix window automatically after running :make
augroup OpenQuickfixWindowAfterMake
    autocmd QuickFixCmdPost [^l]* nested cwindow
    autocmd QuickFixCmdPost    l* nested lwindow
augroup END

For more info, see this Vim Wiki entry.

Tried with: Vim 7.4 and Ubuntu 14.04


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧