Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Editing features for advanced users

by meonkeys (Chaplain)
on Apr 27, 2002 at 20:16 UTC ( #162552=note: print w/replies, xml ) Need Help??

in reply to Editing features for advanced users

gmax++. Excellent article! I've been delving into so many features of vim I don't think I'll ever be able to use another editor. Exporting to syntax-highlighted, numbered HTML is cool. I've also never seen the 'showmatch' option, but always wanted it!

I just have one question for you, which may be more of a ctags question--I don't know. Say you have some perl...
#!/usr/bin/perl -w use strict; use Business::CreditCard qw(); Business::CreditCard::validate('4111111111111111') or die "The credit card number appears to be invalid\n";
When I run on this, it just returns "No tags found.". Isn't the function call a tag? I would expect it to make a tags file with a hyperlink to Business::CreditCard that points straight to the line where validate() is defined. Is this possible? I would so love to know the answer to this riddle. If I could do this it would be incredibly easy to navigate my perl code.

"A Jedi uses the Force for knowledge and defense, never for attack."

Replies are listed 'Best First'.
Re: Re: Editing features for advanced users
by gmax (Abbot) on Apr 29, 2002 at 05:19 UTC
    The purpose of the tags program is to bookmark where a variable or sub was declared, so that you can go back to that point when needed.
    Say you have this script:
    use DBI; use strict; my $DNS = shift; my $dbh = DBI->connect($DNS);
    Save it as and then run
    $ /your_path_to_it/ `perldoc -l DBI`
    (perldoc -l returns the path of an installed module).
    Then, editing, if you have your cursor over the "connect" word, Ctrl-] will take you to the module, at the line where the "connect" sub was defined.
    In your case, replace the script and module names and you'll have some more tags available.
     _  _ _  _  
    (_|| | |(_|><

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://162552]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2019-09-19 12:25 GMT
Find Nodes?
    Voting Booth?
    The room is dark, and your next move is ...

    Results (243 votes). Check out past polls.