VSCodeVim / VSCodeVim/Vim

Close all editors in split on :q execution

Open
#8,558 2 comments 2 reactions 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

Is your feature request related to a problem? Please describe.

Coming from native Vim, I've always used :q to close a split when it's not needed anymore. Since using VSCode-Vim I've found it a bit frustrating having only the current tab close when using :q.

Describe the solution you'd like

It'd be good to have a boolean user setting that, when toggled to true, will close all tabs in a split when :q is executed.

Believe it or not, I've actually already implemented this with automated tests in my own fork. I'm making this issue retrospectively. It'd be cool to make a PR for this.

Describe alternatives you've considered

For about a year during my old job, I've used the following setting to achieve this behavior. It's pretty hacky though because command rebinding isn't a thing in VSCode-Vim.

{
  "vim.commandLineModeKeyBindingsNonRecursive": [
    { "before": [ "q", "<cr>" ], "commands": [ "workbench.action.closeEditorsInGroup" ] }
  ],
}

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 by tracing the :q command handling and the VS Code editor-group close behavior; the issue does not name specific files or entry points. Compare the requested boolean setting with the existing command-line keybinding workaround, then use or recreate the automated tests mentioned by the reporter to verify that :q closes all editors in the current split when enabled.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.