I have a lot of files that have spaces in their names, and this is giving me problems. If I try to do command line completion for the find command, and one of these files come up, Vim will find it, but it won't load because the spaces aren't escaped.
Example: I'm in vim already, and I type
:find fo<Tab>
To complete foo bar.txt
,
Vim then finds it and throws an error because it expects only one filename.
Meaning it now reads
:find foo bar.txt
Which doesn't load.
Is there any way to work around this, and have Vim automatically escape the spaces?
I am using VimTouch, which runs Vim 7.3
Edit: I recently realized that Vim will escape path names for me, but mysteriously won't do so for filenames.
vim
issue (at least, it sounds like you're talking about opening avim
session rather than performing something invim
); but, anyway, would placing a leading"
work? That is, if you want to tab-complete filea b
, typevim "a
and then tab, rather thanvim a
and then tab? (I'm not sure, because, in both my vim and my shell, the space is automatically escaped when tab completing.)