VSCodeVim/Vim

`gd` for local definition / first occurrence in function

Open

#3,319 建立於 2019年1月2日

在 GitHub 查看
 (1 留言) (1 反應) (0 負責人)TypeScript (1,271 fork)batch import
help wantedkind/enhancement

倉庫指標

Star
 (12,664 star)
PR 合併指標
 (平均合併 9天 13小時) (30 天內合併 7 個 PR)

描述

Is your feature request related to a problem? Please describe. In vim, I used to have g-d going to the local definition or the first occurrence in a function for the word under the cursor. However, in VSCode-Vim I found that g-d is liking to the global definition. I already have "CTRL+]" going to the global definition, so I'm wondering how I could have "g-d" going to the local definition / the first occurrence in a function.

Describe the solution you'd like Under NORMAL mode, "g-d" goes to the local definition / first occurrence in a function of the word under the cursor.

Describe alternatives you've considered Search for the word under the cursor with "*" and use "[[" to go to the "{" bracket of a function and press "n" to do the search again.

I found that in the quickref.txt "g-d" "goto local declaration of identifier under the cursor" and "g-D" "goto global declaration of identifier under the cursor". But the current VSCode-Vim doesn't seem to work as it stated :(

貢獻者指南