[vim/vim] C-] jumps to irrelevant defintion (Issue #20532)

5 views
Skip to first unread message

sapri987

unread,
Jun 15, 2026, 5:08:04 AM (3 days ago) Jun 15
to vim/vim, Subscribed
sapri987 created an issue (vim/vim#20532)

Steps to reproduce

Copy these or git clone https://github.com/sapri987/minimum-reproducible-vim-ctags

./importer.py

from . import importee 
 
myvariable = importee.variable

./importee.py

def variable():
    pass

./a_irrelevant_file.py

def variable():
    return 'irrelevant'

Instead of copy pasting you can

git clone https://github.com/sapri987/minimum-reproducible-vim-ctags

Note : if you copy paste, name the files as i did because vim goes to the first file in alphabetical order.

ctags -R .
vim importer.py

set cursor on variable and C-] brings you to the irrelevant definition.

gC-] is not a good solution in my opinion because it is stated at line 1 which file is relevant.

Expected behaviour

vim know which file is relevant because of the import statement and the fact that variable is preceded by importee., and brings you directly to the relevant definition

Version of Vim

9.2 1-623

Environment

Arch Linux
xterm
bash 5.3.15

Logs and stack traces


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20532@github.com>

Mao-Yining

unread,
Jun 16, 2026, 9:38:24 PM (2 days ago) Jun 16
to vim/vim, Subscribed
mao-yining left a comment (vim/vim#20532)

:h tag-priority

ctags don't know what file is imported.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20532/4725119409@github.com>

Mao-Yining

unread,
Jun 16, 2026, 9:39:12 PM (2 days ago) Jun 16
to vim/vim, Subscribed
mao-yining left a comment (vim/vim#20532)

You can use pyright or 'ty'.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20532/4725122910@github.com>

dezza

unread,
Jun 17, 2026, 11:11:08 PM (2 hours ago) Jun 17
to vim/vim, Subscribed
dezza left a comment (vim/vim#20532)
command! -nargs=1 -complete=tag TagLocal execute 'tag ' . filter(taglist(<q-args>), {
_,v->fnamemodify(v.filename,":p" ) == expand("%:p")})->get(0,{})->get(
'name','')

If you want local tag completion look into -complete=customlist,YOURFUNC


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20532/4737456717@github.com>

K.Takata

unread,
Jun 17, 2026, 11:15:30 PM (2 hours ago) Jun 17
to vim/vim, Subscribed
k-takata left a comment (vim/vim#20532)

set cscopetag shows a list when multiple tags are found.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20532/4737479016@github.com>

Reply all
Reply to author
Forward
0 new messages