" C Call-Tree Explorer (CCTree) " " " Script Info and Documentation "============================================================================= " Copyright: Copyright (C) August 2008 - 2011, Hari Rangarajan " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright " notice is copied with it. Like anything else that's free, " cctree.vim is provided *as is* and comes with no " warranty of any kind, either expressed or implied. In no " event will the copyright holder be liable for any damamges " resulting from the use of this software. " " Name Of File: CCTree.vim " Description: C Call-Tree Explorer Vim Plugin " Maintainer: Hari Rangarajan " URL: http://vim.sourceforge.net/scripts/script.php?script_id=2368 " Last Change: June 20, 2011 " Version: 1.55 " "============================================================================= " " {{{ Description: " Plugin generates dependency-trees for symbols using a cscope database " in Vim. " }}} " {{{ Requirements: 1) Vim 7.xx , 2) Cscope " " Tested on Unix and the following Win32 versions: " + Cscope, mlcscope (WIN32) " http://code.google.com/p/cscope-win32/ " http://www.bell-labs.com/project/wwexptools/packages.html " }}} " {{{ Installation: " Copy this file to ~/.vim/plugins/ " or to /vimfiles/plugins/ (on Win32 platforms) " " It might also be possible to load it as a filetype plugin " ~/.vim/ftplugin/c/ " " Need to set :filetype plugin on " " }}} " {{{ Usage: " Build cscope database, for example: " > cscope -b -i cscope.files " [Tip: add -c option to build uncompressed databases for faster " load speeds] " " Load database with command ":CCTreeLoadDB" " (Please note that it might take a while depending on the " database size) " " Append database with command ":CCTreeAppendDB" " Allows multiple cscope files to be loaded and cross-referenced " Illustration: " :CCTreeAppendDB ./cscope.out " :CCTreeAppendDB ./dir1/cscope.out " :CCTreeAppendDB ./dir2/cscope.out " " A database name, i.e., my_cscope.out, can be specified with " the command. If not provided, a prompt will ask for the " filename; default is cscope.out. " " To show loaded databases, use command ":CCTreeShowLoadedDBs" " " To unload all databases, use command ":CCTreeUnLoadDB" " Note: There is no provision to unload databases individually " " To save the current set of databases loaded in to memory onto disk " in native CCTree XRef format, use command ":CCTreeSaveXRefDB" " " To load a saved native CCTree XRef format file, use " command ":CCTreeLoadXRefDB" " " To load a saved native CCTree XRef format file, use " command ":CCTreeLoadXRefDBFromDisk" " " Notes: No merging database support for CCTree native DB's [at present]. " " " To have multiple CCTree preview windows, use ":CCTreeWindowSaveCopy" " Note: Once saved, only the depth of the preview window can be changed " " Default Mappings: " Get reverse call tree for symbol < " Get forward call tree for symbol > " Increase depth of tree and update = " Decrease depth of tree and update - " " Open symbol in other window " Preview symbol in other window " " Save copy of preview window y " Highlight current call-tree flow " Compress(Fold) call tree view zs " (This is useful for viewing long " call trees which span across " multiple pages) " " Custom user-mappings: " Users can custom-map the short-cut keys by " overriding the following variables in their " Vim start-up configuration " " g:CCTreeKeyTraceForwardTree = '>' " g:CCTreeKeyTraceReverseTree = '<' " g:CCTreeKeyHilightTree = '' " Static highlighting " g:CCTreeKeySaveWindow = 'y' " g:CCTreeKeyToggleWindow = 'w' " g:CCTreeKeyCompressTree = 'zs' " Compress call-tree " g:CCTreeKeyDepthPlus = '=' " g:CCTreeKeyDepthMinus = '-' " " Command List: " CCTreeLoadDB " CCTreeAppendDB " CCTreeLoadXRefDB " CCTreeSaveXRefDB " CCTreeLoadXRefDBFromDisk " " CCTreeUnLoadDB " CCTreeShowLoadedDBs " " CCTreeTraceForward " CCTreeTraceReverse " CCTreeRecurseDepthPlus " CCTreeRecurseDepthMinus " CCTreeWindowSaveCopy " " Only in preview window: " CCTreeWindowHiCallTree (same as shorcut) " Highlight calling tree for keyword at cursor " " Dynamic configuration: " CCTreeOptsEnable