Sergey Khorev wrote:
You need to run a script, e.g.
if filereadable("cscope.out")
cs add cscope.out
endif
if filereadable("../cscope.out")
cs add ../cscope.out
endif
etc :)
function GetCscopeFileName()
let curdir = fnamemodify(getcwd(), ':p')
while 1
let f = curdir . (curdir =~ '[\\/]$' ? '' : '/') . 'cscope.out'
if filereadable(f)
" found
return f
endif
" try one level up
let d = fnamemodify(curdir, ':h')
if d == curdir
" trying to go past top level: not found
return ''
endif
let curdir = d
endwhile
endfunction
let csfn = GetCscopeFileName()
if csfn != ''
exe 'cs add' csfn
endif
Best regards,
Tony.
--
One promising concept that I came up with right away was that you could
manufacture personal air bags, then get a law passed requiring that
they be installed on congressmen to keep them from taking trips. Let's
say your congressman was trying to travel to Paris to do a fact-finding
study on how the French government handles diseases transmitted by
sherbet. Just when he got to the plane, his mandatory air bag,
strapped around his waist, would inflate -- FWWAAAAAAPPPP -- thus
rendering him too large to fit through the plane door. It could also
be rigged to inflate whenever the congressman proposed a law. ("Mr.
Speaker, people ask me, why should October be designated as Cuticle
Inspection Month? And I answer that FWWAAAAAAPPPP.") This would save
millions of dollars, so I have no doubt that the public would violently
support a law requiring airbags on congressmen. The problem is that
your potential market is very small: there are only around 500 members
of Congress, and some of them, such as House Speaker "Tip" O'Neil, are
already too large to fit on normal aircraft.
-- Dave Barry, "'Mister Mediocre' Restaurants"