Default mappings for gI: goToImplementation instead enters insert mode at start of line
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Is your feature request related to a problem? Please describe.
The current default keybinding for gI ("enters insert mode at start of line") prioritizes a niche Vim command over goToImplementation, a fundamental code navigation feature used by a much larger majority of developers.
Describe the solution you'd like
The goToImplementation command should be treated as a primary feature with a better default shortcut. I suggest assigning it to gI. For inspiration on sensible defaults that cater to a modern developer workflow, I recommend looking at highly popular Neovim distributions like LazyVim.
Describe alternatives you've considered
A setting could be introduced in settings.json, such as "vim.mappingsMode": "IDE" (default) or "vim.mappingsMode": "vim", to let users choose their preferred keybinding philosophy. While I know it's easy to create custom mappings, I believe the default configuration should be more sensible out-of-the-box for both general developers and existing Vim users.
Additional context
The goToImplementation command is a cornerstone of modern software development for navigating any non-trivial codebase. The existing gI functionality can be easily replicated in Vim by simply using 0i. This makes gI an ideal and available candidate for a goToImplementation mapping, providing a better out-of-the-box experience for most users.
Here's the PR. Mappings works, but the tests are failing. The old tests need to be fixed, and new ones are needed for the gI mapping.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with PR #9688 and inspect the failing tests related to the gI mapping. Update the old expectations and add coverage for goToImplementation on gI; done means the mapping behavior and test suite pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vim, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100