SublimeText / AdvancedNewFile

File creation plugin for Sublime Text

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rename deletes Untitled

anatomatic opened this issue · comments

commented

Twice I've accidentally deleted an untitled tab by trying to save it via ANF: Rename (ANF: Copy works, though you end up with an extra tab). I think I've learned my lesson, but two possible enhancements that might remediate the over-eager, lazy-saver:

  • Override the system "Save" dialog and Make ANF the default. This functionality already exists in the plugin CreateSavePrompt (MIT License). Probably best if it's an advanced option exposed in Package Settings. The whole reason I shoot my foot is because ANF is better than the system dialog.
  • The more obvious option is to change the behavior of Rename to "Move" an untitled file to its new location via ANF.

Thanks for considering. I'll try to save before I type.

Hi @anatomatic, my apologies, I thought I handled the new file case on the move also. Thanks for the report.

I recurrent this case. and it is a untiltled file that includes multiple bytes chars.

the content is:

你好

or

😄

the both of rename and copy will lose the content in new named file.

Thanks.