From: Marc Elser <melser@gm...> - 2006-11-23 06:36:20
I'm a long time cream user and I've tweaked quite a lof things in my
cream-user.vim but one thing I'm still uncertain about: I have a working
installation of ctags but when editing source code files (mostly in
perl) I didn't find out yet how to automatically jump to a subroutine
(or a tag for a subroutine) under the cursor. Do I really have to create
ctags for the file I'm editing manually? And while editing it quite
often happens that you write new methods/subroutines so, to use them
too, I would have to run ctags create add-on every time I want to use an
added subroutine? I really hope I'm missing something and there is a
simple way I didn't have come across.
All I want is to jump to a subroutine under the cursor (inside the same
file) without having to create ctags every time, just like the
CTRL-ALT-DOWN subroutine list but without having to open the plugin and
finding the subroutine first. Is there any way to do this?
Thanks for everyone on ideas, cause this feature is the one I'm missing
most since switching from UltraEdit about 1 year ago.
From: Steve Hall <digitect@da...> - 2006-11-24 00:47:34
On Thu, 2006-11-23 at 07:36 +0100, Marc Elser wrote:
> I have a working installation of ctags but when editing source code
> files (mostly in perl) I didn't find out yet how to automatically
> jump to a subroutine (or a tag for a subroutine) under the cursor.
> Do I really have to create ctags for the file I'm editing manually?
Since Vim completely depends on an external tag program for definition
navigation, so does Cream. But this is just semantics, it would be
simple add auto-tag generation onto the Alt-Down navigation for the
behavior you describe. Something like this is what other text editors
do, it feels integrated.
The difficulty is that this behavior can overwrite a manually written
tag file. Since tag files might contain manually-added references to
files outside of the current directory (e.g., Cream!), how would the
routine know how to re-generate an existing tag file with the same
logic? Is this per chance built into the tag file that we could parse?
Since it is easy to map the Ctag Generate add-on to a keystroke, I'm
hesitant to try and write logic to do it automatically, unless someone
can illustrate a way of distinguishing and maintaining the logic of
any non-Cream generated tag file that might be overwritten.
Steve Hall [ digitect dancingpaper com ]
:: Cream... usability for Vim