On Jan 19, 1:36 am, "Benjamin R. Haskell" <[email protected]> wrote:
> I was trying to loop over parent directories to find cscope.out files.  
> And I don't quite grok the following:
>
> Why does this print 'blah':
>
> :let file = "blah" | echo file
>
> while this complains that 'file' isn't found:
>
> :let file = "blah" | cs add file
>

While the :echo command takes an expression, the :cs add command takes
a file name. The commands expect completely different arguments. You
will NEED to use :exec in order to dynamically build a :cs command.

I have additionally found (at least on Windows) that the :cs add
command will NOT work with spaces in the path. Not sure why, but I've
worked around it using fnamemodify() with the :8 filename modifier.
See :help ::8
-- 
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Reply via email to