1

According to the help page the only difference between :make and :make! is that the latter doesn't jump to the first error. So why isn't :make! <Bar> silent cnext<CR> equivalent to :make?

I'm using the following compiler in ~/.config/nvim/after/compiler/python3.vim:

if exists("current_compiler")
  finish
endif
let current_compiler = "python3.vim"

let s:cpo_save = &cpo
set cpo&vim

CompilerSet errorformat=
  \%*\\sFile\ \"%f\"\\,\ line\ %l\\,\ %m,
  \%*\\sFile\ \"%f\"\\,\ line\ %l,
CompilerSet makeprg=python3\ %

let &cpo = s:cpo_save
unlet s:cpo_save

If I edit this test file

foo
print("foo")

make jumps to the first line, while make! followed by a cnext returns the error

E553: No more items

Is the quickfix list not being populated with :make!?

4

This is happening because while :make! doesn't jump to the first error message, it actually sets the quickfix cursor at it. So when you use :cnext it will actually try to go to the second error, which in your case doesn't exist. (You can easily prove that yourself by creating a test case that produces more than one error.)

If you use :make! and then want to jump to the current error (which should be the first one), you can use :cc instead. (See :help :cc.)

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.