math2001 / FileManager

⚡️ A Sublime Text 3 package to help with file (duplicate, move, create...) ⚡️
https://math2001.github.io/FileManager
MIT License
105 stars 18 forks source link

Alpha ST4 - Duplicate Rename entries on menu #49

Open TerminalFi opened 4 years ago

TerminalFi commented 4 years ago

Sublime Text 4 Alpha 4061 FileManager - Latest Release via PackageControl

I know this is alpha, but might be a good way to get a jump start on updates.

image

math2001 commented 4 years ago

Damn, I didn't hear about ST4 for a while, I'm not too involved with ST (anymore?). Anyway, thanks for reporting :slightly_smiling_face:

I don't really wanna go through the hastle of finding the downloads for ST4 (and I don't think you should post them here either, I think they want it to be somewhat private).

Anyway, there are two options: remove the FileManager's rename command, or hide their command. If i throw out FileManager's rename, it's going to break consistency, though it's not that bad, I use their rename command all the time. Hiding their command is really easy (if the menu system still works the same way as in ST3, and it looks like it does from your screenshot)

I'm thinking throw out FIleManager's rename command. The less custom stuff, the better. What do you think?

TerminalFi commented 4 years ago

I’ll remove FM function and see how everything flows. I really like FM over sidebar enhancements. Perhaps I’ll start familiarizing myself with ST4 API and try to keep FM up to date with PR’s

TerminalFi commented 4 years ago

@math2001 Unless there is any functions we can implement that the current ST rename doesn't offer, then I believe we should just disable this menu item by default and mark as deprecated. That will then provide time to really think about it before ripping out the code.

math2001 commented 4 years ago

Unless there is any functions we can implement that the current ST rename doesn't offer, then I believe we should just disable this menu item by default and mark as deprecated

Yep, thanks for making that clear in my head. That didn't stand out to me for some reason (guess I'll try to think a bit more next time).

I looked at the Sublime Text 3 rename.py, and it looks like it does everything that fm_delete would do, but better. There is no difference between ST4 and ST3's rename (it's just that neat :ok_hand:)

I wouldn't have thought of marking it as deprecated as a first step either, and that's clearly a much better thing to do.

math2001 commented 4 years ago

Wait hang on, I can't quite understand how you got this context menu in the first place... the default rename command should have been disabled by prevent_default.py. I looked at the Default package, and it declares the same commands. That's kind of surprising.

Anyway, it's better to use the default command regardless.

redgluten commented 3 years ago

Just a little feedback: it seems that FM is quite unstable with ST4 I had an issue where deleting a file from the sidebar menus would delete two different files. After disabling FM the problem does not appears anymore.

If I understand correctly ST4 dev is already quite advanced and many people like me are using it because of compatibility issues of ST3 (macOS Big Sur and M1 chips in my case).

I don’t know if you plan to work on a proper ST4 upgrade since you mentioned not being so involved anymore, if that’s the case and you want a better bug report I can try to do that. In the meantime maybe a little warning in the Package Control install messages about the compatibility might prove useful.