I try to compile vim with cscope. However, I keep encountering the error E257: cstag: tag not found, no matter what position the cursor locates at when pressing CTRL ].

My vim version is 8.2. My dir structure is


I have done the following :

  1. stick the file cscope_maps.vim in my $HOME/.vim/plugin
  2. in the project root, use cscope -R to generate database.

However, even though the cscope GUI works fine after cscope -R and I could see the file cscope.out in the root directory, I could not jump to the definition with CTRL ], which shows the error E257: cstag: tag not found

  • :help cscope-how-touse: perhaps you need :cs add cscope.out? Check :cs show
    – D. Ben Knoble
    Feb 8, 2021 at 21:43
  • wow thanks @D.BenKnoble. Could you formalize your comment as an answer ? Like why we need :cs add cscope.out and how it is not automatically compiled ?
    – exteral
    Feb 8, 2021 at 22:10


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.