VSCodeVim / VSCodeVim/Vim

[CURSOR] Go to function definition using "CTRL" + "]"

Open
#9,565 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Describe the bug
Vim plugin in cursor behaves weirdly when you try to go to the function definition and go back to the function usage.

It's almost storing the old state of "going to the function definition" and when you try to click on any other keyboard after "CTRL" + "]", vim is throwing you to the same function definition.

To Reproduce
Steps to reproduce the behavior:

  1. Put cursor position on a function usage.
  2. Use the following key combo: "CTRL" + "]"
  3. It will bring you to the function definition
  4. If you click on "CTRL" + "]" vim is going to bring you back to that function usage.
  5. Now, try to switch from normal mode to insert mode.
  6. Vim is going to bring you back to the function definition even though that was not your intention.

Expected behavior
Vim shouldn't be forcing you to go to the function definition after you went there on your own using "CTRL" + "]" and now you just want to switch to insert mode.

Screenshots

Cursor starting position:
Image

After hitting the following key combo "CTRL" + "]":
Image

After hitting the key combo again:

Image

And now press "i" for switching to insert mode and vim is forcing you to go to the function def. again and put you in insert mode there:

Image

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.29.0
  • VSCode version: 0.48.7
  • OS: MacOS, 14.6.1

Additional context

In VSCode Vim plugin works perfectly as expected but something weird is going on in Cursor IDE I can't figure out how to find a work around this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file or test is named. Start by reproducing the Ctrl-] navigation and subsequent insert-mode switch in Cursor using the reported versions, then compare the same steps in VSCode Vim; done means Cursor no longer jumps back to the function definition after switching modes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.