Recent versions of Vim provide each quickfix list with a unique id and allow you to set an arbitrary "context" attribute on the list.

I'd like to set the "context" on an existing quickfix list.

This works:

call setqflist([], 'r', {'context': 'foo'})

but it's unclear to me whether I should use 'r' (replace) or 'a' (append), since I'm not actually modifying the list entries, just a property attached to the overall list. It seems to behave the same either way, so I guess that argument is irrelevant in this case, but am I missing something?

Your Answer

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

Browse other questions tagged or ask your own question.