Now I am learning how to use GNU GLOBAL in vim. I have installed
gtags.vim. I have
gtags the kernel source directory. The
.vimrc includes the following lines:
set cscopetag set csprg=gtags-cscope cs add GTAGS
Assume that I am editing the file
arch/x86/kvm/x86.c and the cursor is on the function call
kvm_lapic_enabled(). Now I press
^], the vim complains like this:
E429: File "arch/x86/kvm/lapic.h" does not exist E257: cstag: tag not found
If I remove the
set cscopetag in
.vimrc, the vim will complains like this:
E433: No tags file E426: tag not found: kvm_lapic_enabled
So I guess that in the first case, vim used the tag file generated by gtags to locate the function and learned that it is defined in
arch/x86/kvm/lapic.h. However, vim seems to lookup this file under current directory, that is
arch/x86/kvm/arch/x86/kvm/lapic.h, when using cscope by default.
So how to configure vim to let
^] can utilize the GTAGS correctly? Exactly, how to configure the
cscope find command to use the GTAGS correctly?
Thanks very much!