Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
4  
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

1 Answer 1

: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

 
discard

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.