On Sat, Sep 19, 2009 at 6:48 AM, Ryan J M <[email protected]> wrote: > > On Sat, Sep 19, 2009 at 6:10 PM, Tim Chase <[email protected]> wrote: > >> Hrm...an extra space seems to be missing from there. I guess >> that's what I get for typing at 3:00am while feeding the kid. >> That should have been >> >> map <leader>e :e <c-r>=escape(expand("%:p:h"), " ")."/"<cr> >> ^ >> to instruct Vim to escape spaces. This should change >> >>> ":e /home/xx/backup_Fri Sep 18 19:32:14 CST 2009/test/" >> >> into >> >> :e /home/xx/backup_Fri\ Sep\ 18\ 19:32:14\ CST\ 2009/test/ >> >> which then does allow me to hit tab/^D to do filename expansion >> within such a directory. At least on the Linux box I've got >> here. Not sure how it behaves in Win32. >> > > Thanks, works for me on CentOS! > both your map and the original one work on gvim72 on win32.
Isn't fnameescape() a better function to use here? It will escape the spaces, as well as a handful of other troublesome characters.... ~Matt --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
