From: R. Steve McKown Date: Mon, 5 Oct 2015 03:04:17 +0000 (-0600) Subject: Remove mkbuild#selectXrefs X-Git-Url: https://oss.titaniummirror.com/gitweb?p=vim-mkbuild.git;a=commitdiff_plain;h=7ba078c7fb1c9a445c4f9db531f09b222f182dc9 Remove mkbuild#selectXrefs This function, which uses dmenu, has been deprecated in favor of the unite-xrefs plugin. The dmenu method is fine but won't work in every tty session, for example over an ssh connection. --- diff --git a/plugin/mkbuild.vim b/plugin/mkbuild.vim index 82c03a2..fd92caa 100644 --- a/plugin/mkbuild.vim +++ b/plugin/mkbuild.vim @@ -138,29 +138,3 @@ function! mkbuild#DmenuOpen(cmd) execute a:cmd . " " . fname endif endfunction - -" Look recursively from the current directory for directories containing a -" tags files and/or a cscope database. Allow the user to select one of these -" directories. Both its tag file and its associated cscope database, as -" present, are made active for cross referencing. -function! mkbuild#SelectXrefs() - let cmd = 'find . -type f -name tags -o -name cscope.out | ' . - \ 'while read f; do echo $(dirname $f); done | sort -u | sed -e "s|\./||"' - let curr = s:chompsys('dirname "' . &tags . '"') - let dname = s:chompsys(cmd . ' | dmenu -i -l 20 -p "xref (' . curr . ')"') - if empty(dname) - return - endif - let file = dname . "/tags" - let &tags='' - if filereadable(file) - let &tags = file - endif - if has('cscope') - let file = dname . "/cscope.out" - exe 'cscope kill -1' - if filereadable(file) - exe 'cscope add ' . file - endif - endif -endfunction