On 2014-03-04, Christian Brabandt wrote: > Am 2014-03-04 08:15, schrieb Gary Johnson: > >There is a difference between the expansion of % and Ctrl-R % on the > >command line. > > > >I use Dropbox to keep a number of my configuration files, including > >my ~/.vim directory, synchronized between various machines running > >Linux and Windows. > > > >Today I discovered this file in the ~/Dropbox/vimfiles of a machine > >named toucan which is running Fedora 14: > > > > filetype (toucan's conflicted copy 2014-03-01).vim > > > >Using a GUI file manager, I opened this file with gvim. I made some > >changes to it, then tried comparing the changed buffer with the > >copy on disk with this command which I have used for years: > > > > :w !diff "%" - > > > >The result surprised me. > > > > diff: Dropbox/vimfiles/filetype \(toucan's conflicted copy > >2014-03-01\).vim: No such file or directory > > That indeed looks wrong. Interestingly, it seems to work for me, when > escaping the quote, like this: > > :w !cmd \"%\" - > > (note sure, why this works). > > For the most recent versions, I think :w !cmd %:S - should also work.
I observed the problem on Linux, not Windows, so cmd is not involved. Vim's expansion of % may differ between Linux and Windows. Regards, Gary -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.