I'm trying to get to the point where I can build a CMake project in neovim and have it output a quickfix list that I can quickly step through. In Visual Studio, I would typically hit CTRL+b for build, and use F8 to step through errors. That's what I'm aiming for. When I run a command line such as this:

:ASyncRun cmake --build .

I see the following in my quickfix window:

|| [cmake --build .]
|| Microsoft (R) Build Engine version 16.2.0-preview.19264.2+c3389964c for .NET Framework
|| Copyright (C) Microsoft Corporation. All rights reserved.
||   Checking Build System

I'm not sure why I get the || at the beginning of each line, but they are obviously messing up the quickfix, because :cn, etc. just steps through every line. I was hoping for just a list of error lines that I could step through.

Any tips for getting this to work on Windows?

1 Answer 1


I found I needed to change my errorformat for VC. Here's what I did:

" Thanks to https://forums.handmadehero.org/index.php/forum?view=topic&catid=4&id=704#3982
" error message formats
" Microsoft MSBuild
set errorformat+=\\\ %#%f(%l\\\,%c):\ %m
" Microsoft compiler: cl.exe
set errorformat+=\\\ %#%f(%l)\ :\ %#%t%[A-z]%#\ %m
" Microsoft HLSL compiler: fxc.exe
set errorformat+=\\\ %#%f(%l\\\,%c-%*[0-9]):\ %#%t%[A-z]%#\ %m

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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