*CCTree.txt* Plugin for C Call-Tree Explorer *CCTree* Author: Hari Rangarajan (First.Last AT gmail DOT com) Last Change: 20 May 2011 CCTree version 1.51 For Vim version 7.0 and above ============================================================================== 1. Overview |CCTree-overview| 2. Downloads |CCTree-download| 3. Installation |CCTree-installation| 4. Configuration |CCTree-configuration| 5. Features |CCTree-features| 6. Limitations |CCTree-limitations| 7. FAQ & TIPS |CCTree-faq| 8. History |CCTree-history| 9. Thanks |CCTree-thanks| ============================================================================== 1. Overview~ *CCTree-overview* Plugin generates dependency-trees for symbols using a cscope database in Vim. Basic cross-referencing includes functions and macros. Enhanced symbol processing covers macros, typedefs, enums, and global variables. Requires Cscope and works best with C code. ============================================================================== 2. Downloads~ *CCTree-download* You can download the latest release of the script from this url : http://www.vim.org/scripts/script.php?script_id=2368 Cscope packages can be found here: http://cscope.sourceforge.net/ http://code.google.com/p/cscope-win32/ ============================================================================== 3. Installation~ *CCTree-installation* Copy this file to ~/.vim/plugins/ or to /vimfiles/plugins/ (on Win32 platforms) It should also be possible to load it as a filetype plugin ~/.vim/ftplugin/c/ Need to set :filetype plugin on ============================================================================== CONFIGURATION *CCTree-configuration* 4. Options~ You can customize behavior by changing the following variable settings 4.1.1 Cscope Symbol Database~ *CCTreeCscopeDb* Cscope database file, g:CCTreeCscopeDb = "cscope.out" 4.1.2 Call-tree Depth~ *CCTreeRecursiveDepth* Maximum call levels, g:CCTreeRecursiveDepth = 3 4.1.3 Call-tree Minimum Visible Depth~ *CCTreeMinVisibleDepth* Maximum visible(unfolded) level, g:CCTreeMinVisibleDepth = 3 4.1.4 Call-tree window display~ 4.4.1 Orientation~ *CCTreeOrientation* Orientation of window, g:CCTreeOrientation = "leftabove" (standard vim options for split: [right|left][above|below]) 4.5 Direction~ *CCTreeWindowVertical* Use Vertical window, g:CCTreeWindowVertical = 1 4.5.1 Dimensions~ These settings determine the layout of the CCTree preview window. 4.5.2 Horizontal Window Settings~ *CCTreeWindowHeight* Horizontal window, g:CCTreeWindowHeight, default is -1. 4.5.2 Vertical Window Settings~ *CCTreeWindowMinWidth* *CCTreeWindowWidth* Minimum width for window, g:CCTreeWindowMinWidth = 40. g:CCTreeWindowWidth = -1, auto-select best width to fit. 4.6 Call-tree display format~ *CCTreeDisplayMode* Display format, g:CCTreeDisplayMode, default: 1 Values: 1 -- Ultra-compact (takes minimum screen width) 2 -- Compact (Takes little more space) 3 -- Wide (Takes copious amounts of space) For vertical splits, 1 and 2 are good, while 3 is good for horizontal displays. 4.7. Dynamic Call-tree highlighting~ *CCTreeHilightCallTree* Enable/disable dynamic call-tree highlighting, default: 1 4.7.1 Syntax items~ *CCTreeSymbol* *CCTreeHiSymbol* CCTreeSymbol is the symbol name. CCTreeHiSymbol is the highlighted call tree functions. *CCTreeMarkers* *CCTreeHiMarkers* CCTreeMarkers include "|","+--->". CCTreeHiMarkers is the same as CCTreeMarkers except these denote the highlighted call-tree. ============================================================================== COMMAND LIST *CCTree-commands-list* Database Management~ CCTreeLoadDB CCTreeAppendDB CCTreeUnLoadDB CCTreeShowLoadedDBs Refer to |CCTree-usage| Native Xref Database~ CCTreeLoadXRefDB CCTreeSaveXRefDB Refer to |CCTree-fast-loading| Symbol tracing~ CCTreeTraceForward CCTreeTraceReverse CCTreeRecurseDepthPlus CCTreeRecurseDepthMinus Refer to |CCTree-explore-source| Trace Management~ CCTreeWindowSaveCopy CCTreeWindowHiCallTree Refer to |CCTree-preview-window| Dynamic configuration~ CCTreeOptsEnable