From 5f01248d3717f1e2a3758d3b6a07f00b23c006d9 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Wed, 2 Apr 2014 16:35:37 +0200 Subject: [PATCH] [vim]update cctree plugin --- .vim/plugin/cctree.vim | 3837 ++++++++++++++++++++++++++++++++-------- 1 file changed, 3136 insertions(+), 701 deletions(-) diff --git a/.vim/plugin/cctree.vim b/.vim/plugin/cctree.vim index 4aab5a5..afe4656 100644 --- a/.vim/plugin/cctree.vim +++ b/.vim/plugin/cctree.vim @@ -1,9 +1,9 @@ " C Call-Tree Explorer (CCTree) " " -" Script Info and Documentation +" Script Info and Documentation "============================================================================= -" Copyright: Copyright (C) August 2008, Hari Rangarajan +" 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, @@ -16,50 +16,72 @@ " Description: C Call-Tree Explorer Vim Plugin " Maintainer: Hari Rangarajan " URL: http://vim.sourceforge.net/scripts/script.php?script_id=2368 -" Last Change: December 24, 2008 -" Version: 0.61 +" Last Change: June 10, 2012 +" Version: 1.61 " "============================================================================= -" -" Description: -" Plugin generates call-trees for any function or macro in real-time inside -" Vim. " -" Requirements: 1) Cscope -" 2) Vim 7.xx +" {{{ 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://www.geocities.com/shankara_c/cscope.html +" http://code.google.com/p/cscope-win32/ " http://www.bell-labs.com/project/wwexptools/packages.html -" -" -" -" Installation: +" }}} +" {{{ Installation: " Copy this file to ~/.vim/plugins/ -" or to /vimfiles/plugins/ (on Win32 platforms) -" +" 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 -" +" Need to set :filetype plugin on " -" Usage: +" }}} +" {{{ 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 +" (Please note that it might take a while depending on the " database size) " -" A database name, i.e., my_cscope.out, can be specified with -" the command. If not provided, a prompt will ask for the +" 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 unload database, use command ":CCTreeUnLoadDB" +" 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 < @@ -70,23 +92,81 @@ " 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 -" CCTreeUnLoadDB +" CCTreeAppendDB +" CCTreeLoadXRefDB +" CCTreeSaveXRefDB +" CCTreeLoadXRefDBFromDisk +" +" CCTreeUnLoadDB +" CCTreeShowLoadedDBs +" " CCTreeTraceForward -" CCTreeTraceReverse -" CCTreeRecurseDepthPlus -" CCTreeRecurseDepthMinus +" CCTreeTraceReverse +" CCTreeRecurseDepthPlus +" CCTreeRecurseDepthMinus +" CCTreeWindowSaveCopy +" +" Only in preview window: +" CCTreeWindowHiCallTree (same as shorcut) +" Highlight calling tree for keyword at cursor +" +" Dynamic configuration: +" CCTreeOptsEnable