VSCodeVim / VSCodeVim/Vim

Option to throw popup on saving error instead of just status bar message

Open
#7,720 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/commandline area/configuration kind/enhancement
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.
The problem is you can try to :w save a no-write-permission file, but not ever see the error message telling you it failed to save.
Messages that exceed the width of the status bar are hidden instead of clipped. There's an outstanding ticket with vscode to address this, but it's been backlogged. https://github.com/microsoft/vscode/issues/84258. Even if that were fixed, I'd want the option of a more obvious notification that the save failed to go through.

Describe the solution you'd like
An option to invoke the native vscode saving mechanism with :w, which will throw a pop-up if there are any errors saving the file. The key is to be obvious when something went wrong. I understand some people will prefer the more subtle status bar messages, so this could be opt-in.

Describe alternatives you've considered
One workaround is to always keep your vscode window maximized, so messages are less likely to exceed the status bar width. However I prefer to keep the window half-screen-width, which hits this issue often with the long paths in our repository.
I've also tried overriding :w in user settings to use the native saving function as proposed by https://github.com/VSCodeVim/Vim/issues/1282, but that doesn't seem to work.

    "vim.normalModeKeyBindingsNonRecursive": [
        // :w should save whether or not file is dirty,
        // and show pop-up if no write permissions
        {
            "before": [":", "w"],
            "commands": ["workbench.action.files.save"]
        },
    ]

Additional context
vscode_permissionsWarning
vscode_vanishingErrorMsg

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 how the :w command is handled and how the native workbench.action.files.save command behaves on save errors. Determine where an opt-in setting could select that behavior, then verify that failed saves produce an obvious popup while the existing status-bar behavior remains available.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.