Thursday, September 9, 2010

Re: Gvim + ctags+omnicppcomplete on WinXP. Please help!

[reversed top-posting]

On Thu, 9 Sep 2010, Andriy Y wrote:

> >
> > On Thu, Sep 9, 2010 at 6:29 PM, 曹锡韬 <xitao.cao@gmail.com> wrote:
> > 在 2010-09-09四的 06:13 -0700,Andrey写道:
> > > Hi,
> > > I've been really happy working with vim in Linux, but now I'm in
> > > Windows and tags in Vim seem broken.
> > >
> > > Here is my config: Gvim 7.3, ctags 5.8, omnicppcomplete (0.41), WinXP
> > > SP3
> > > Now, I was trying to parse the Bada platform includes as well as STL
> > > from Visual Studio with the command:
> > > ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++
> > > c:\Bada\1.0.0\include
> > > I reassured it has non-zero value (6 MB), copied to folder with _vimrc
> > > and added line to the latter:
> > > set tags+="c:\Program Files\Vim\bada"
> >
> > I suppose you want to save your bada tag file name as 'bada' under "c:
> > \Program Files\Vim". So I think you should specify your tagname with the
> > command as below,
> > ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ -f
> > "c:=\Program Files\vim\bada" c:\Bada\1.0.0\include.
> > All above is according to my experience in linux...
>
> It's not about saving tags file. The file is created, I see it, rename
> it to "bada" (from default "tags").It's about vim ignores file with
> tags, be it Program Files\Vim\bada or .\tags - and I don't know why.
>

Unless the situation has changed, you can't use ctags files under Vim if
you're dealing with paths that contain spaces. I believe the limitation
applies to both files being tagged (which should be okay, if
c:\Bada\1.0.0\include[...] doesn't have files with spaces in their
names), and to the tags file itself (which isn't okay as it is, due to
the space in 'Program Files').

I might be wrong about the latter limitation, so you might try quoting
it differently: '\b' is the escape sequence for a 'backspace' character.
So, your path including "\Vim\bada" won't be interpreted properly. You
should either use single quotes:

set tags+='c:\Program Files\Vim\bada'

or double the '\'s:

set tags+="c:\\Program Files\\Vim\\bada"

--
Best,
Ben

--
You received this message from the "vim_use" 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

No comments:

Post a Comment