Vim: Given q! VSCode should not prompt to save

Created on 24 Oct 2016  路  10Comments  路  Source: VSCodeVim/Vim

  • Click thumbs-up 馃憤 on this issue if you want it!
  • Click confused 馃槙 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


What did you do?

:q!

What did you expect to happen?

Current buffer would be closed and I would not be prompted to save.

What happened instead?

I was prompted.

Technical details:

  • VSCode Version: 9e4e44c19e393803e2b05fe2323cf4ed7e36880e (1.6.1)
  • VsCodeVim Version: 0.3.9
  • OS: macOS Sierra (10.12)

vscode-vim-qbang

kinenhancement

Most helpful comment

I'm back from my honeymoon and I'll get to it when I get my back on track with my job :)

All 10 comments

Code doesn't allow us to do so, that's basically why ...

@rebornix Is there a VSCode issue open for this? It should probably be linked back here in case it is...

@mixedCase I found this https://github.com/Microsoft/vscode/issues/8009 but it's not a perfect match.

@misoguy added this to the API of vscode so once that is released this should be doable right away with workbench.action.revertAndCloseActiveEditor

I'd like to give this a shot when it's released :)

I'm back from my honeymoon and I'll get to it when I get my back on track with my job :)

What do you think @misoguy have some time or should we tackle it? :)

@xconverge Sorry it took me so long :( I'm back on track now and i'll send a PR soon(probably within this week)!

@xconverge I'm currently looking at the code and found some wierd behaviors.

  1. The command "q" on the current version of VIM does nothing when the editor is dirty.
    1.1. It seems like the condition here is emitting an error to stop any action.
  2. The command "q!" on the other hand, prompts a confirm box when the editor is dirty.
    2.1. It passes the condition mentioned in 1.1. and executes command closeActiveEditor

However I don't understand why I can't get "q!" to pop the confirm box when my editor is dirty when trying in local development mode. Any idea what is going on?

@misoguy I honestly have no idea. I assume it's some kind of bug with the local development environment...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AndersenJ picture AndersenJ  路  3Comments

ghost picture ghost  路  3Comments

liamdawson picture liamdawson  路  3Comments

lucastheisen picture lucastheisen  路  3Comments

typeoneerror picture typeoneerror  路  3Comments