VSCodeVim / VSCodeVim/Vim

Help with remapping `<Tab>` to `<Esc>`

Open
#4,922 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug
I am trying to remap Tab to Esc with no luck:

"vim.insertModeKeyBindings": [
        {
            "before": ["<Tab>"],
            "after": ["<Esc>"]
        }
    ]

I have tried with "<Tab>", "Tab". I have also tried "before": ["j", "j"], which works but is not the keymap I am looking for. Looking in the package.json it seems "tab" is not bound when in Insert mode.

  1. Can this be worked around to bind Tab to Esc in Insert mode?
  2. or: Can Tab be bound in package.json while in Insert mode?

Environment (please complete the following information):

  • Extension (VsCodeVim) version:
  • VSCode version: 1.14.5
  • OS: Windows 10

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

Start with the package.json keybinding definition linked in the issue, especially lines 94-97, and trace how insertModeKeyBindings handles the Tab and Esc key names. Reproduce the provided configuration in VS Code and verify that a working change lets Tab leave insert mode as Esc does.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.