windowsvimeditor

How to use "gf" on filenames containing spaces in gVim?


In gVim if the cursor is over a filename (like "C:\Program Files\Vim\vim71\README.txt" ) which contains spaces then using 'gf' fails.

I found the isfname option but the documentation says one should avoid using spaces.

Is there I can make gVim open files under these circumstances ?


Solution

  • Select the text in visual mode, then do a gf on it. That gets around the problem to some extent.