From: Burton Samograd <kruhft@gmail.com>
Subject: Re: navigate in C
Date: Thu, 26 Oct 2006 09:29:53 -0600 [thread overview]
Message-ID: <87odrznlhq.fsf@gmail.com> (raw)
In-Reply-To: mailman.266.1161870876.27805.help-gnu-emacs@gnu.org
Pedro Sa da Costa <op132650c@mail.telepac.pt> writes:
> 1 - Is there a way in C mode to, by selecting the .h file or a method
> and press a shortcut key, go that file or function?
>
> For example:
>
> #include "header.h"
>
> by pressing F3 in the selected "header.h", or simply have the cursor
> of the header file, open the file.
I haven't found anything that does this just yet (I'm sure it's
probably somewhere in emacs), and have been writing something like
this myself...
> int test(){
> call_test();
>
> }
>
> have the cursor above "call_test()" call and pressing F3, goes to the
> function.
Check Info: Emacs: Tags. A simple HOWTO on tags is:
1) Run 'etags *.c *.h' in the shell to create a TAGS file (better yet
put it in your Makefile so it's run when the source is updated; it's
fast so it can be run on every rebuild). If you do this, add
(setq tags-revert-without-query 't) to your .emacs so you don't have
to type 'y' every time the tags file is updated.
2) Over the variable or function type M-. to go to it's definition.
3) M-* pop's (goes back to) where you were before.
Check the info manual for more options and advanced tags usage.
Another thing about tags is you can perform completion on them using
M-TAB (which you might have to rebind if your window manager steals
that for switching windows...C-TAB would work just as well)
Hope this helps.
--
burton samograd kruhft .at. gmail
generative a/v artwork : http://kruhft.boldlygoingnowhere.org
next parent reply other threads:[~2006-10-26 15:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.266.1161870876.27805.help-gnu-emacs@gnu.org>
2006-10-26 15:29 ` Burton Samograd [this message]
2006-10-26 18:03 ` navigate in C Vagn Johansen
2006-10-26 13:54 Pedro Sa da Costa
2006-10-26 15:51 ` Kevin Rodgers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87odrznlhq.fsf@gmail.com \
--to=kruhft@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).