Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In vim, I move cursor to the function I'm interested in,

then press ^W,

then press gf.

It'll automatically open the referenced function.

How does it work?

share|improve this question
Probably just ordinary magic. – Kusalananda Sep 20 '11 at 12:44
@KAK,what do you mean? – xpbug Sep 20 '11 at 12:52
Sorry, it was a joke. I was remembering a quote from Arthur C. Clarke: "Any sufficiently advanced technology is indistinguishable from magic." – Kusalananda Sep 20 '11 at 13:12

:he CTRL-W_gf says it will open file under cursor in new tab.

If it does something else try :verbose nmap <C-w>gf to see if there is a mapping which does anything else.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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