Skip to content

Default mappings for gI: goToImplementation instead enters insert mode at start of line #9689

Open
@klaskow

Description

@klaskow

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions