LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-25-2010, 08:32 PM   #1
sethu.psgtech
LQ Newbie
 
Registered: Mar 2007
Posts: 2

Rep: Reputation: 0
Goto Definition


Hi all ,

I am relatively new to Linux and want a few pointers regarding developing in C.

Is there any command that can take me to definition of the function or variable (I have worked in Visual Studio which has a cool "Go to Definition" feature). is there an equivalent here ? I tried CScope but it needs to switch between terminals. Is there a shortcut somewhere?

Thanks for any help.
 
Old 01-25-2010, 09:44 PM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
If you prefer to use a full-blown IDE, then Eclipse is a comprehensive one, available in the repositories of most distributions of Linux.

The shortcut in Eclipse is typically something like using the ctrl key and clicking on the token to go to the definition.

Last edited by neonsignal; 01-25-2010 at 09:47 PM.
 
Old 01-25-2010, 10:15 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Or vim ... not quite as fat as Eclipse.
 
Old 01-25-2010, 11:21 PM   #4
sethu.psgtech
LQ Newbie
 
Registered: Mar 2007
Posts: 2

Original Poster
Rep: Reputation: 0
@ NeonSignal : i feel Eclipse is a little too heavy for what i have in mind .. but if nothing works out , will use it ..

@ Tinkster : using Vim , how should i go to the definitions ?
 
Old 01-26-2010, 01:31 AM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Search google for
Code:
autocmd FileType c set omnifunc=ccomplete
That gives vim autocompletion features and displays
the function definition in a 'pane'.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
BASH goto dkrysak Programming 35 03-21-2013 10:22 AM
Shell script goto? hawk__0 Linux - General 9 08-21-2009 01:46 AM
can you use goto in bash script sabliny Programming 3 10-07-2005 05:54 PM
goto usage bru Programming 5 03-09-2004 03:44 AM
Goto command? batfoot Linux - General 4 08-26-2003 07:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration