To see all the files that Vim sourced during launch, I typed
I found that:
- When launching vim with the command
$vim --noplugin or
$vim, there is a
/etc/vimrc file which is sourced;
- When launching vim with
$vim -u NONE or
$vim -u NORC, this
/etc/vimrc file is gone.
There are other differences in the list of sourced files, but only
/etc/vimrc caught my eye because
vimrc is included in this path.
Then I experimented with
/etc/vimrc and I found that one statement in it was modifying the behavior
When I comment out this line, the problem no longer exists.
From the vim help (
If 'cscopetag' is set, the commands ":tag" and CTRL-] as well as "vim
-t" will always use :cstag instead of the default :tag behavior.
If you use cscope as well as ctags, |:cstag| allows you to search one
or the other before making a jump. For example, you can choose to
first search your cscope database(s) for a match, and if one is not
found, then your tags file(s) will be searched. The order in which
this happens is determined by the value of |csto|. See
|cscope-options| for more details.
|:cstag| performs the equivalent of ":cs find g" on the identifier
when searching through the cscope database(s).
|:cstag| performs the equivalent of |:tjump| on the identifier when
searching through your tags file(s).