LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 09: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, 10:44 PM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Stretch (Fluxbox WM)
Posts: 1,389
Blog Entries: 52

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
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 10:47 PM.
 
Old 01-25-2010, 11:15 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Or vim ... not quite as fat as Eclipse.
 
Old 01-26-2010, 12:21 AM   #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, 02:31 AM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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 11:22 AM
Shell script goto? hawk__0 Linux - General 9 08-21-2009 02:46 AM
can you use goto in bash script sabliny Programming 3 10-07-2005 06:54 PM
goto usage bru Programming 5 03-09-2004 04:44 AM
Goto command? batfoot Linux - General 4 08-26-2003 08:17 PM

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

All times are GMT -5. The time now is 02:53 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration