|> Probably this is emacs.
what else? ;-)
> May be i miss a command like M-x goto-definition in some mode?
well these are several questions ... point for point.
- you said the mouse is needed
every x-action is bound to a function and can be bound to a key too, and the function word-at-point gives you the word under the cursor. So you can freely combine any mouse-action with the word-at-point .
Tip: C-h k doesn't only show you the keybinding of the next keystrokes, but also of the following mouse actions. Hence you can see what is triggered and use it in your own scripts.
- getting all "local" subs
cperl-mode supports imenu , which scans the current buffer for every sub declaration.
Just go to the menu bar and click <menu-bar> <Perl> <Tools> <Imenu> and you'll see a list of all subs in the buffer.
- jumping to the sub at point
When called interactively with M-x imenu or a key-binding like C-c i or M-Ret (personal binding) offers all alternatives in the mini-buffer (the bottom line) but defaulting to the word at point.
For instance in my bindings M-RET RET lets me jump to that definition.
- automatically showing that a sub is local
Cperl mode has a setting to automatically show a mini-description for any Perl construct under the cursor In the message area. See <menu-bar> <Perl> <Toggle...> <Auto-help on Perl constructs>
One could also hack this interface to show information for the sub at point using the data from imenu
- Choroba mentioned etags/ctags
These is necessary for bigger projects where the definition is in another file. I was only replying to the "local" requirement. ( Tags are tricky in a language which can only be parse by its own runtime engine ;)
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.