Friday, June 5, 2009

Using cscope and ctags

Many people complain that though Linux is in C they don't have good IDE for C development. Though there the things mentioned here are not great but they are good enough to help you in C development.

1. Cscope

find . -name '*.c' > cscope.files
cscope -i cscope.files


cscope.files is default file name, thus just cscope command would work. To exit, you can type Ctrl+D and to see help, you can type "?".

2.Ctags

cd /path/to/your/project
ctags -R *
vim -t

Once inside a file, hitting ctrl-] while the cursor is over a function/class name, Vim will attempt to open the file with that tag. Pressing ctrl-t will take you back a step. To exit, , regular ":q" should work.

No comments:

Post a Comment