update cscope db from vim

osgx picture osgx · Apr 30, 2010 · Viewed 17.8k times · Source

I use cscope with vim. When doing large edits for several files, cscope will report old line numbers for changed files. How can I rebuild cscope db from vim without losing

  • opened tabs/windowses in vim
  • connection with cscope engine

Thanks

Answer

czchen picture czchen · Aug 4, 2010

First, you need to update cscope database.

:!cscope -Rbq

Then, reinit the database from vim.

:cs reset