" Vimball Archiver by Charles E. Campbell, Jr., Ph.D. UseVimball finish plugin/FlistTree.vim [[[1 237 " FlistTree.vim " Maintainer: Charles E. Campbell, Jr. PhD. " Date: Jan 02, 2008 " Version: 9b ASTRO-ONLY " --------------------------------------------------------------------- " Load Once: {{{1 if exists("g:loaded_FlistTree") || &cp finish endif let g:loaded_FlistTree = "v9b" let s:keepcpo = &cpo set cpo&vim "DechoTabOn " --------------------------------------------------------------------- " Public Interface: {{{1 if has("gui_running") menu DrChip.FlistTree.FlistTree\ filename :FlistTree menu DrChip.FlistTree.Go\ up\ one\ level\\[\. [. menu DrChip.FlistTree.Go\ down\ one\ level\\]\. ]. menu DrChip.FlistTree.Go\ to\ prv\ same\ depth\\[[ [[ menu DrChip.FlistTree.Go\ to\ nxt\ same\ depth\\]] ]] endif " --------------------------------------------------------------------- " Options: {{{1 " allow user to override use of "ctags" with whatever tagging program they " like if !exists("g:FlistTree_tags") let g:FlistTree_tags="ctags" endif if !exists("g:FlistTree_options") let g:FlistTree_options="-asx" endif if !exists("g:FlistTreeWidth") let g:FlistTreeWidth=25 endif " --------------------------------------------------------------------- " Functions: {{{1 " FlistTree#FlistTree: Generate graphtree window using flist program {{{2 fun! FlistTree#FlistTree(...) " call Dfunc("FlistTree#FlistTree(a:1<".a:1.">)") if a:1 != "" let flistfiles=expand(a:1) " call Decho("a:1 flistfiles<".flistfiles.">") else let flistfiles=expand("%") " call Decho("expand: flistfiles<".flistfiles.">") endif " Generate vertically split window " call Decho("generate vertically split empty window") vsp ene " generate tags for given file(s) " put graphtree in left window if g:FlistTree_tags != "" " call Decho("applying ".g:FlistTree_tags." to <".flistfiles.">") silent exe "!".g:FlistTree_tags." ".flistfiles endif " call Decho("applying flist to <".flistfiles.">") silent exe "r !flist -Tg ".g:FlistTree_options." ".flistfiles exe "norm! ggdd" set nomod if exists("g:winManagerWidth") wincmd h exe g:winManagerWidth.'wincmd |' else wincmd h exe g:FlistTreeWidth.'wincmd |' endif " GraphTree maps nnoremap :call FlistOpen() nnoremap