On 7/11/07, Steve Hall <digitect@dancingpaper.com> wrote:
From: "jim cipar", Wed, July 11, 2007 9:08 am
>
> I'm a vim user trying out cream, and I've had trouble getting ctags
> to work for me. The problem is that I generate a tags file at the
> root of a source directory. When I ask cream to edit a file in a
> subdirectory, it changes its cwd to where the file is, and therefore
> can't find the tags file. This problem does not exist in gvim or
> evim.
>
> For instance if I do this:
> cd sourcedir
> ctags -R
> cream foo/main.c
>
> Then put cream in expert mode and type :pwd, it prints out
> "/blah/sourcedir/foo", while gvim would print out "/blah/sourcedir".
> When I try to jump to a tag in cream, it can't find the tags file
> because it is not in the right directory.
>
> Furthermore, even if I just start cream in the "sourcedir"
> directory, it will change to "sourcedir/foo" when I open " main.c".
> gvim does not do this.
>
> Any suggestions?

I always ctag with absolute paths to solve this:

  ctags -f "[path]/tags" "[path]/*.c"

The current directory following behavior is not always ideal but is
better than always opening to the Vim program directory (Vim's
default). There are other schemes applications use, but anything more
sophisticated is incredibly complicated and fakes me out more than
half the time ( e.g., AutoCAD and Adobe products).


--
Steve Hall  [ digitect dancingpaper com ]
:: Cream... usability for Vim
::   http://cream.sourceforge.net

It's not that  cream can't find the file that the tag points to.  It can't find the tag file at all, because the tag file is at the root of a directory heirachy, and the file being edited is in a subdirectory.  I could probably solve it by generating a tag file with absolute path names, and copying/linking it into every subdirectory where source files exist, but that seems like a pretty ugly hack, especially when the default vim behavior works.