Vim Tips Wiki
Explore
Main Page
All Pages
Community
Interactive Maps
Community portal
To do
FANDOM
Fan Central
BETA
Games
Anime
Movies
TV
Video
Wikis
Explore Wikis
Community Central
Start a Wiki
Don't have an account?
Register
Sign In
FANDOM
Explore
Current Wiki
Start a Wiki
Don't have an account?
Register
Sign In
Sign In
Register
Vim Tips Wiki
1,649
pages
Explore
Main Page
All Pages
Community
Interactive Maps
Community portal
To do
Editing
Script:2368
Back to page
Edit source
View history
Talk (0)
Edit Page
Script:2368
We recommend that you
log in
before editing. This will allow other users to leave you a message about your edit, and will let you track edits via your
Watchlist
.
Creating an account
is quick and free.
The edit appears to have already been undone.
Anti-spam check. Do
not
fill this in!
{{ScriptComments|CCTree: show call tree of C code}} ==Comments== This is useful: <pre> " CCTree auto-add of all Cscope databases command! -bar CCTreeLoadCurrentDBs call MyCCTreeLoadDBs() function! MyCCTreeLoadDBs() let save_more = &more set nomore redir => csc_dbs cscope show redir END let csc_db_list = split(csc_dbs, "\n") let csc_db_list = csc_db_list[2:] " remove header line and spacing line " get just the DB file path, assumes no spaces in file path, probably this can " be tweaked to allow spaces if needed. call map(csc_db_list, 'split(v:val)[2]') " load the first DB if there are any if len(csc_db_list) > 0 echomsg 'Loading' fnameescape(csc_db_list[0]) exec 'CCTreeLoadDB' fnameescape(csc_db_list[0]) endif " append all the others if there are any more if len(csc_db_list) > 1 for csc_db in csc_db_list[1:] echomsg 'Loading' fnameescape(csc_db) exec 'CCTreeAppendDB' fnameescape(csc_db) endfor endif let &more = save_more endfun </pre> Perhaps something similar could be built in, in a future release? --[[User:Fritzophrenic|Fritzophrenic]] 15:36, June 23, 2011 (UTC) Win32 bug, CCTreeLoadDb cannot parse windows filenames with colon, e.g. @C:/src/hello.c ... CCTree load error on windows. @ src/hello.c ... CCTree works fine on windows. will error out, workaround is to use only relative paths on windows.
Summary:
Please note that all contributions to the Vim Tips Wiki are considered to be released under the CC-BY-SA
Cancel
Editing help
(opens in new window)
Template used on this page:
Template:ScriptComments
(
view source
)
Follow on IG
TikTok
Join Fan Lab