facelessuser / TabsExtra

Sublime Plugin with sticky tabs, more tab closing options, and additional menu items.
https://facelessuser.github.io/TabsExtra/
MIT License
107 stars 10 forks source link

Add toggle to hide "Dismiss Unsaved" option #22

Closed chrisirhc closed 9 years ago

chrisirhc commented 9 years ago

I think this option is very dangerous as it can result in permanent loss of data. I'm suggesting to add an option in the package's settings to disable this command completely. It should be hidden from every view, and from the Command window.

It's really easy to intend to Skip Unsaved but hit enter on the wrong option.

facelessuser commented 9 years ago

I think this option is very dangerous as it can result in permanent loss of data.

Maybe...if the user isn't paying attention; I have never had this happen, but that doesn't mean you don't have a point.

I'm suggesting to add an option in the package's settings to disable this command completely. It should be hidden from every view, and from the Command window.

How about this, what if when an option is selected from the dismiss menu, a single dialog pops up notifying the user that they are about to wipe out all unsaved data to the targeted tabs.

This gives the user an opportunity to go ^#%@, I did not mean to do that!, and cancel. I think this is conservative and safe without being overzealous and banishing the commands as if they were some unholy creation that should not be looked upon. This makes it available without being dangerous. What do you think :smile:?

chrisirhc commented 9 years ago

Hmm.. That should work, whichever is easier for you to implement. :+1: Just a safety net would be good. I always feel my hair standing whenever I see that option when I type "Close" in the command list. Haha.

facelessuser commented 9 years ago

I have found the dismiss commands very useful (if you ever try and batch close multiple unsaved buffers, every unsaved tab pops up it's own dialog... it's horrible). A single dialog is real easy to insert, and in retrospect, probably should have been added.

facelessuser commented 9 years ago

Safety net is in https://github.com/facelessuser/TabsExtra/commit/3a1056431cd94503fd624b1689558d8d1d9044fa and has been merged to the ST3 branch. You should be able to type "Close" without fear :wink:.

ionous commented 4 years ago

Just a note, it's also pretty easy to manually edit the context menu to remove the "Dismiss Unsaved" section. The file containing the menu is stored under the TabsExtra user preferences:

On Mac it's at: ~/Library/Application Support/Sublime Text 3/Packages/User/TabsExtra/Tab Context.sublime-menu

To restore the original TabsExtra menu, you can re-run Preferences->Package Settings->TabsExtra>Install/Upgrade TabsExtra Menu at any time.