How to limit tabs for split screens

Hello!

Coming from PhpStorm, I prefer not to have any tabs, but to work in split screens. I have one file per screen, and that’s it. It’s minimal and I like it! :smile:

I have workbench.editor.showTabs set to “none”, so that’s doing a great job of hiding the tabs. My problem is that when I open files it’s implicitly still creating tabs per screen. I know this because when I press cmd+w to close a screen, it just closes that file. I have to keep pressing that until all files I’ve opened are closed.

I trid settings workbench.editor.limit.value to 1, but that doesn’t seem to have done anything.

Here are my settings:

{
    "window.commandCenter": 1,
    "editor.fontSize": 14,
    "terminal.integrated.fontSize": 14,
    "cursor.cpp.enablePartialAccepts": true,
    "cursor.aipreview.enabled": true,
    "cursor.cmdk.useThemedDiffBackground": true,
    "editor.minimap.enabled": true,
    "editor.minimap.autohide": true,
    "workbench.editor.showTabs": "none",
    "chat.editor.fontSize": 14,
    "debug.console.fontSize": 14,
    "git.repositoryScanMaxDepth": -1,
    "git.detectSubmodulesLimit": 20,
    "php.problems.exclude": {
        "vendor/": true,
        "**/vendor/": true
    },
    "search.followSymlinks": true,
    "search.useIgnoreFiles": true,
    "files.exclude": {
        "**/.git": true,
        "**/.svn": true,
        "**/.hg": true,
        "**/CVS": true,
        "**/.DS_Store": true,
        "**/Thumbs.db": true,
        "**/node_modules": true,
        "**/.git": true,
        
        // Don't exclude wp-content/plugins
        "wp-content/plugins": false
    },
    "search.exclude": {
        "**/node_modules": true,
        "**/bower_components": true,
        "**/*.code-search": true,

        // Don't exclude wp-content/plugins
        "wp-content/plugins": false
    },
    "workbench.colorTheme": "Atom One Light",
    "editor.fontLigatures": true,
    "editor.fontFamily": "Fira Code, Monaco, 'Courier New', monospace",
    "workbench.editor.limit.perEditorGroup": true,
    "workbench.editor.limit.value": 1,
}

Thank you!

The issue you’re experiencing is that Cursor still maintains a history of files opened in each editor group, even with tabs hidden.

To get closer to the PhpStorm behavior you want, try adding these settings:

"workbench.editor.enablePreview": true,
"workbench.editor.enablePreviewFromQuickOpen": true,
"workbench.editor.closeEmptyGroups": true

The preview mode should help replace the current file rather than creating a new tab when opening files. However, VS Code’s architecture still maintains a tab history per editor group, which is why you need to press cmd+w multiple times.

If you want to completely close an editor group rather than cycling through its history, you can use:

  • On Mac: cmd+k w
  • On Windows/Linux: ctrl+k w

This will close all editors in the current group at once.

1 Like

Thank you, @danperks! I changed cmd+w to close the entire group and now it feels as I’d expect. Thank you!