build a symbol database for vim

#!/bin/sh

# find src files
find . ! -path ./exclude_dir_1\* -a           \
! -path ./exclude_dir_2\* -a          \
-regex “.*\.\(c\|h\|hpp\|cc\|cpp\|s\)” >  cscope.files

# number is exact match, or else use search by default

ctags -L cscope.files –language=c:.c.h,c++:.cpp.hpp.cc,Asm:.s –excmd=number
cscope -bqk

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.