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

I am using vim for coding. When I have something like the following:
SomeModule->actualMethod() if I take the cursor to SomeModule and I do a gf I get a complaint that SomeModule- does not exist in the path.
How can I get rid of the - so that the SomeModule file opens?

share|improve this question
up vote 3 down vote accepted

What Vim considers part of a filename is controlled by the 'isfname' option. You need to remove the dash from it for your example to work:

:set isfname-=-

Note that when your SomeModule file has a file extension, you also need to add it to 'suffixesadd'.

share|improve this answer
So the =- means that what comes after = is not part of a filename? And if I need to exclude other characters? E.g. a - and a : as not acceptable parts of filename? – user65971 May 21 '13 at 20:20
The -= deletes the following string from isfname. See :help :set-=. If you wish to delete other characters from isfname, be sure to delete them one character at a time. That is, execute :set isfname-=- and :set isfname-=:, not :set isfname-=-:. The last command will work only if -: are present in isfname together and in that order. – garyjohn May 21 '13 at 21:04

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.