--
Replace junk-mailbox with j-kroll to reply
Regards,Quote:> I am a windows programmer just switched to linux and have been
> familiar with the main dev tools such as vi, gcc, make, etc. However,
> I find it very difficult to navigate the source code of a large
> project which consists of hundreds of classes/variables/functions.
> Searching for a word in Windows IDE is trivial and I don't think it
> painful to do the same thing in UNIX. Do Unix programmers have better
> memory than the Windows counterparts. If not, how can I do it? in
> terminal and X? Thanks!
You can run 'vimtutor' to become familiar with vim - it's a very, veryQuote:> However, I find it very difficult to navigate the source code of a
> large project which consists of hundreds of
> classes/variables/functions.
/regexp [enter]Quote:> Searching for a word in Windows IDE is trivial and I don't think it
> painful to do the same thing in UNIX.
Search and replace:
:s/regexp/replacement/
YesQuote:> Do Unix programmers have better memory than the Windows counterparts.
In terminal: learn vim. In X: you might want to take a look at Kate -Quote:> If not, how can I do it? in terminal and X?
Sybren
--
| Somebody ought to cross ball point pens with coat hangers so that |
| the pens will multiply instead of disappear. |
\-------------------------------------------------------------------/
If you have to use Outlook, fix it: http://jump.to/oe-quotefix
vim has integration with etags, to allow easy navigation between
declarations and implementations in header/source files.
A helpful tip in vim, is to use Ctrl+P and Ctrl+N in edit mode to perform
auto-completion of the current word.
Another GUI tool that helps with navigating through sources is Source
Navigator (from Red Hat, open source.) Navigator even goes as far as
creating source structure diagrams.
Happy coding.
--
Bryan Bulten
http://opendev.ods.org/
http://wxnet.sourceforge.net/
Besides that, grep is your friend. 'grep -n "Whatiamlookingfor" *' will
give you the file names and line numbers of every occurance of what you
are looking for. Grep is also capable of searching based on regular
expressions so you can do more complicated searches. If you are using
emacs you can run this command from right inside the editor and have the
results displayed in a new buffer. Grep is the answer you are looking for.
You may also find emacs speedbar of some help. If you use X and xemacs
it is a little window that has a navigatable tree. If you have eieio
installed then it will use speedbar to display a tree similar to what
you would find in MSVC.
NR
> You can run 'vimtutor' to become familiar with vim - it's a very, very
> powerful editor, and since I started using it, I won't use any other
> editor.
> > Searching for a word in Windows IDE is trivial and I don't think it
> > painful to do the same thing in UNIX.
> /regexp [enter]
> Search and replace:
> :s/regexp/replacement/
> > Do Unix programmers have better memory than the Windows counterparts.
> Yes
> > If not, how can I do it? in terminal and X?
> In terminal: learn vim. In X: you might want to take a look at Kate -
> it's a very nice editor as well.
> Sybren
Give it the 'no highlighting' command:Quote:> I've tried the search command and the word is highlighted in brown
> everytime I launch vi. How can I cancel this effect?
:noh [enter]
Sybren
--
| Somebody ought to cross ball point pens with coat hangers so that |
| the pens will multiply instead of disappear. |
\-------------------------------------------------------------------/
If you have to use Outlook, fix it: http://jump.to/oe-quotefix
I use nedit for text editing, and grep to find occurances of a word.Quote:>I am a windows programmer just switched to linux and have been
>familiar with the main dev tools such as vi, gcc, make, etc. However,
>I find it very difficult to navigate the source code of a large
>project which consists of hundreds of classes/variables/functions.
>Searching for a word in Windows IDE is trivial and I don't think it
>painful to do the same thing in UNIX. Do Unix programmers have better
>memory than the Windows counterparts. If not, how can I do it? in
>terminal and X? Thanks!
KDevelop is reputed to be good, but I've not used it myself.
--
Interested in adventure holidays in Spain?
Look at: <http://www.cabalamat.org/advcon/>
Some text editors, notably vi and Emacs, are able to parse those files
and use them to look up the original "bit of code."
"man ctags" or "man etags" for more details.
Note that the version distributed as etags knows how to cope with
additional languages such as C++, Java, Objective C, Fortran (perhaps
they mean FORTRAN), Ada, several flavors of Lisp, Perl, Python,
Prolog, and even macro assemblers.
--
http://www3.sympatico.ca/cbbrowne/unix.html
The IQ of the group is the lowest IQ of a member of the group divided
by the number of people in the group.
> There are programs called "ctags" and "etags" (one being at least
> _originally_ associated with Emacs; guess which one?) that will parse
> source code in C and possibly other languages and generate TAGS files
> containing lists of the hundreds of variables/functions/objects/....
> Some text editors, notably vi and Emacs, are able to parse those files
> and use them to look up the original "bit of code."
> "man ctags" or "man etags" for more details.
> Note that the version distributed as etags knows how to cope with
> additional languages such as C++, Java, Objective C, Fortran (perhaps
> they mean FORTRAN), Ada, several flavors of Lisp, Perl, Python,
> Prolog, and even macro assemblers.
As for some tutorials, just search Google - thats how I learned
it.
--
Eric Enright /"\
sauronAtiptsoftDcom \ / ASCII Ribbon Campaign
X Against HTML E-Mail
Public Key: 0xBEDF636F / \
>> There are programs called "ctags" and "etags" (one being at least
>> _originally_ associated with Emacs; guess which one?) that will parse
>> source code in C and possibly other languages and generate TAGS files
>> containing lists of the hundreds of variables/functions/objects/....
>> Some text editors, notably vi and Emacs, are able to parse those files
>> and use them to look up the original "bit of code."
>> "man ctags" or "man etags" for more details.
>> Note that the version distributed as etags knows how to cope with
>> additional languages such as C++, Java, Objective C, Fortran (perhaps
>> they mean FORTRAN), Ada, several flavors of Lisp, Perl, Python,
>> Prolog, and even macro assemblers.
> I've read the man pages of etags but they give no examples. Therefore
> I still can't use it efficiently in the project, esp. let it cooperate
> with vi. Could you please recommend some tutorials or books that give
> more illustrations? It would be better if they can be downloaded from
> the web or read online.
Presumably, the documentation you seek might be found in the
documentation set for your favorite flavour of vi.
--
http://www3.sympatico.ca/cbbrowne/linux.html
"Wow! You read advocacy groups once in a while, thinking you'll find
the occasional gem, but when you unearth the Taj Mahal you still have
>>I've read the man pages of etags but they give no examples. Therefore
>>I still can't use it efficiently in the project, esp. let it cooperate
>>with vi. Could you please recommend some tutorials or books that give
>>more illustrations? It would be better if they can be downloaded from
>>the web or read online.
>>Regards!
> In the source directory, do something like `ctags *', or maybe
> `ctags *.c *.h' then fire up vim. While coding, if you want to
> see the definition for something, put the cursor over it and
> press CTRL-]. If the appropriate tag is found (ie, a struct
> defininition), the file containing it is loaded into a buffer
> with the cursor at the definition.
> As for some tutorials, just search Google - thats how I learned
> it.
http://www.google.com.au/search?q=vi++quick+reference&ie=UTF-8&oe=UTF...
http://www.google.com.au/search?q=vim+quick+reference&ie=UTF-8&oe=UTF...
1. Curses file viewer source code wanted
From inside a C program I'd like to be able to use a function which
"shows a file to a user". It should be curses based, and allow the
user the ability to move around the file (lines up/down, page up/down,
horizantal scroll, etc.).
Does something come to mind? The horizantal scroll sounds quite
difficult, but is extremely important to this application (I'm
planning on displaying tables wider than 80 cols, and it'll be
ridiculous having a emacs/vi type wrap).
Is it sensible to open up one of the few dozen PD editors and hack
at it to do the above? Alternatively one could reprogram the editor
(if it's programmable) to disable all the text-modification features.
Any help will be much appreciated,
-ans.
--
3. File-viewer C source code wanted
4. LVD/Ultra 2 Adaptec 19160 ?
5. learning unix programming by studying unix source code ?
6. Quantum Prodrive ELS Spins Down By Itself
7. need source code for pipe system call for linux or unix or xinu.
9. I need to get hold of a simple Unix Shell source code
10. Unix network programming; compiling source code problem
11. How to #define multiple text lines in Unix c source code
12. W: Source Code for "UNIX System V Network Programming, Stephen A. Rago
13. Source code for BSD Unix commands