Thursday, January 28, 2010

RE: how to use string variable for "cs add" command

Thanks pansz!
It works!!

But I found ctags cannot work as well.

let CodeRoot = "E:/code"
let TagsDb = CodeRoot . "/tags"

use
exe "set tags = " . TagsDb
or
set tags = TagsDb

both cannot work. Do you have any idea? Thanks in advance!

-----Original Message-----
From: vim_use@googlegroups.com [mailto:vim_use@googlegroups.com] On Behalf Of pansz
Sent: Friday, January 29, 2010 11:24 AM
To: vim_use@googlegroups.com
Subject: Re: how to use string variable for "cs add" command

Ni, Ruiyu 写道:
> Hi,
> How can I make the following command pass VIM check in _vimrc file?
>
> let CodeRoot = "E:/code"
> let CscopeDb = CodeRoot . "/cscope.out"
> cs add CscopeDb CodeRoot
>
>
> the problem is in line 3, cs add only accept direct string but not the variable. For example if I use the following cs add command VIM is fine.
> Cs add E:/code/cscope.out E:/code
>
> Thanks,
> Ray
>

what about

:exe "cs add ".ScsopeDb." ".CodeRoot


?

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment