1

I have realized that the quickfix window isn't opening automatically when it's supposed to. I have tested this on both Gvim and vim 7.4 on Windows 10 Version 10.0.10586 Build 10586. I have a few plugins installed but I want to know how I might debug this first before I strip my vim configuration down to a minimum working example. Where do I start looking for the problem?

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Feb 18 2016 07:00:12)
MS-Windows 32-bit GUI version
Included patches: 1-1345
Compiled by jrinehar@JRINEHAR
Huge version with GUI.  Features included (+) or not (-):
+acl                +emacs_tags         +modify_fname       -sun_workshop
+arabic             +eval               +mouse              +syntax
+autocmd            +ex_extra           +mouseshape         +tag_binary
+balloon_eval       +extra_search       +multi_byte_ime/dyn +tag_old_static
+browse             +farsi              +multi_lang         -tag_any_white
++builtin_terms     +file_in_path       -mzscheme           -tcl
+byte_offset        +find_in_path       +netbeans_intg      -tgetent
+channel            +float              -ole                -termresponse
+cindent            +folding            +path_extra         +textobjects
+clientserver       -footer             -perl               +title
+clipboard          +gettext/dyn        +persistent_undo    +toolbar
+cmdline_compl      -hangul_input       -postscript         +user_commands
+cmdline_hist       +iconv/dyn          +printer            +vertsplit
+cmdline_info       +insert_expand      +profile            +virtualedit
+comments           +job                +python/dyn         +visual
+conceal            +jumplist           -python3            +visualextra
+cryptv             +keymap             +quickfix           +viminfo
+cscope             +langmap            +reltime            +vreplace
+cursorbind         +libcall            +rightleft          +wildignore
+cursorshape        +linebreak          -ruby               +wildmenu
+dialog_con_gui     +lispindent         +scrollbind         +windows
+diff               +listcmds           +signs              +writebackup
+digraphs           +localmap           +smartindent        -xfontset
-directx            +lua/dyn            -sniff              -xim
-dnd                +menu               +startuptime        -xterm_save
-ebcdic             +mksession          +statusline         +xpm_w32
   system vimrc file: "$VIM\vimrc"
     user vimrc file: "$HOME\_vimrc"
 2nd user vimrc file: "$HOME\vimfiles\vimrc"
 3rd user vimrc file: "$VIM\_vimrc"
      user exrc file: "$HOME\_exrc"
  2nd user exrc file: "$VIM\_exrc"
  system gvimrc file: "$VIM\gvimrc"
    user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
3rd user gvimrc file: "$VIM\_gvimrc"
    system menu file: "$VIMRUNTIME\menu.vim"
Compilation: gcc -Iproto -DWIN32 -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_GETTEXT -DHAVE_LOCALE_H -DDYNAMIC_GETTEXT -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_CHANNEL -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -w -march=i686 -Wall -IC:/Lua/include -IC:/Lua -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL="lua53.dll" -DFEAT_PYTHON  -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL="python27.dll" -DFEAT_XPM_W32 -I xpm/x86/include -I xpm/x86/../include -O3 -fomit-frame-pointer -freg-struct-return -s
Linking: gcc -Iproto -DWIN32 -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_GETTEXT -DHAVE_LOCALE_H -DDYNAMIC_GETTEXT -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_CHANNEL -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -w -march=i686 -Wall -IC:/Lua/include -IC:/Lua -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL="lua53.dll" -DFEAT_PYTHON  -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL="python27.dll" -DFEAT_XPM_W32 -I xpm/x86/include -I xpm/x86/../include -O3 -fomit-frame-pointer -freg-struct-return -s -mwindows -o gvim.exe -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lversion -lwsock32 -Lxpm/x86/lib -lXpm -lole32 -luuid
  • 4
    A good place to start looking would be the docs. The quickfix window is not supposed to open automatically. Some plugins might do that, but plain Vim is not supposed to do it. – Sato Katsura Feb 21 '16 at 9:19
  • @SatoKatsura, I had looked at the docs, but it never said that it wouldn't open automatically. Do you know of a way to force the quickfix window to open automatically whenever it's been "created"? I want to add something helpful to my vimrc. – fuzzybear3965 Feb 22 '16 at 16:12
2

In BuildToolWrappers, I have encapsulated :make + :cwindow behind another :Make command. (the command does many more things, but this is the part you are looking for)

  • I am trying to make vimgrep open the quickfix window (I'm not using the quickfix window in a compilation/make environment). I've been using :copen to do this. On a sidenote, after looking at the documentation for :copen and :cwindow I don't understand the difference between them. Do you know the difference? – fuzzybear3965 Feb 22 '16 at 16:21
  • :copen always open the qf-window. :cwindow only opens it when there are recognized errors. If a program compiles, then there won't be any error, and then, :cwindow won't do anything. – Luc Hermitte Feb 22 '16 at 16:48
  • Okay, but there are other cases, besides compilation, when a quickfix (like :vimgrep) should be opened. Is there a way to make the quickfix always open as soon as there is information to show in the quickfix window (i.e. after :make or :vimgrep)? The :vimgrep /something/ *.bar followed by :copen pattern is getting old. – fuzzybear3965 Feb 22 '16 at 16:56
  • I'm afraid it's not possible. May be, you could listen to QuickFixCmdPost event and force the :copen, but I'm not sure it's free from any side effect. – Luc Hermitte Feb 22 '16 at 17:04
  • Okay, that's okay. Thanks Luc, for the heads up about your plugin. I'll include it in case I end up compiling in the future. – fuzzybear3965 Feb 22 '16 at 17:07
1

I had this problem when I had multiple versions of it, one for gvim and other for vim. Please check if it works for one version or the other. For me it was set nocompatible in .vimrc that forbid the cwindow for non-gvim version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.