I can jump to a function definition thanks to :tjump.

Or I can search for a function call in a file with / but is there a way to iterate through function calls across various files ?

If the solution is language specific, I am interested in how to do it for C.

  • @D.BenKnoble I replaced references by calls. Is there anything else that's unclear ? Seems like your comment could make an answer. Do you want to make it an answer or should I do it ?
    – cassepipe
    Apr 20 '21 at 18:42
  • 1
    I’m happy to let your answer stand :) “iterate” was really the word I was struggling with, but at this point I’ll delete my comments. You might be especially interested in :help :cdo and :help Cfilter
    – D. Ben Knoble
    Apr 20 '21 at 22:07

It seems that :grep some_word is what I was looking for. It populates a quickfix list that you can navigate with :cnext and :cprev.

A good idea is to map those to ]q and [q respectively.

:cfirst and :clast might be worth mentionning too.

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.