VSCodeVim / VSCodeVim/Vim

vim dont work if is not buffer open

Open
#8,700 5 comments 1 reaction 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

i have some keymaps to show projects and do more stuff, but vim only works if i have a buffer or tab open, if not any command is not executed, even if i am in a project or a folder

"vim.leader": "<space>",
  "vim.foldfix": true,
  "vim.hlsearch": true,
  "vim.useSystemClipboard": true,
  "vim.highlightedyank.enable": true,
  "vim.highlightedyank.color": "rgba(28, 78, 216, 0.5)",
  "vim.normalModeKeyBindings": [
    {
      "before": [
        "leader",
        "p"
      ],
      "commands": [
        "projectManager.listGitProjects#sideBarGit"
      ]
    },
    {
      "before": [
        "leader",
        "a"
      ],
      "commands": [
        "workbench.action.toggleActivityBarVisibility",
      ]
    },
    {
      "before": [
        "leader",
        "w"
      ],
      "commands": [
        ":w!"
      ]
    },
    {
      "before": [
        "leader",
        "q"
      ],
      "commands": [
        ":q!"
      ]
    },
    {
      "before": [
        "leader",
        "x"
      ],
      "commands": [
        ":x!"
      ]
    },
    {
      "before": [
        "<c-a>"
      ],
      "after": [
        "g",
        "g",
        "V",
        "G"
      ]
    },
    {
      "before": [
        "<S-h>"
      ],
      "commands": [
        ":bprevious"
      ]
    },
    {
      "before": [
        "<S-l>"
      ],
      "commands": [
        ":bnext"
      ]
    },
    {
      "before": [
        "leader",
        "v"
      ],
      "commands": [
        ":vsplit"
      ]
    },
    {
      "before": [
        "leader",
        "s"
      ],
      "commands": [
        ":split"
      ]
    },
    {
      "before": [
        "leader",
        "h"
      ],
      "commands": [
        "workbench.action.focusLeftGroup"
      ]
    },
    {
      "before": [
        "leader",
        "j"
      ],
      "commands": [
        "workbench.action.focusBelowGroup"
      ]
    },
    {
      "before": [
        "leader",
        "k"
      ],
      "commands": [
        "workbench.action.focusAboveGroup"
      ]
    },
    {
      "before": [
        "leader",
        "l"
      ],
      "commands": [
        "workbench.action.focusRightGroup"
      ]
    },
    {
      "before": [
        "leader",
        "f"
      ],
      "commands": [
        "workbench.action.quickOpen"
      ]
    },
    {
      "before": [
        "z",
        "r"
      ],
      "commands": [
        "editor.foldAll"
      ]
    },
    {
      "before": [
        "z",
        "m"
      ],
      "commands": [
        "editor.unfoldAll"
      ]
    },
    {
      "before": [
        "leader",
        "c"
      ],
      "commands": [
        "editor.action.commentLine"
      ]
    },
    {
      "before": [
        "g",
        "h"
      ],
      "after": [
        "g",
        "^"
      ]
    },
    {
      "before": [
        "g",
        "l"
      ],
      "after": [
        "g",
        "$"
      ]
    },
  ],
  "vim.insertModeKeyBindings": [
    {
      "before": [
        "k",
        "j"
      ],
      "after": [
        "<Esc>",
        "l"
      ]
    }
  ],

Here you can se i have a buffer open and f that open files works
image

But if i close all buffer like this i cant use any vim command
image

The vim extension is active but i cant even type ":" for put a command
image

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

Reproduce the problem in VS Code with all buffers closed, using the keybindings and screenshots in the issue as the scenario. Inspect the extension's handling of Vim input and command execution when no editor buffer is open; done means Vim commands, including ':' and the listed keybindings, work in that state.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.