-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alpha ST4 - Duplicate Rename entries on menu #49
Comments
Damn, I didn't hear about ST4 for a while, I'm not too involved with ST (anymore?). Anyway, thanks for reporting 🙂 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? |
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 |
@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. |
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 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. |
The slight problem is that if we don't disable the default command, then it shows up before the `New` command, which isn't right. So, instead, we enable the default (rename_path), but hide it (is_visible() -> False). Then, we create our own little command (fm_rename_path) that calls rename_path. Like this, we control where fm_rename_path shows up in the context menu. File Manager: Rename has been removed from the command palette (use Rename File). fm_rename now prints a deprecation warning. We don't use Python's warning module because warnings aren't enabled by default, and I don't want to change the defaults for everyone. ref #49
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 Anyway, it's better to use the default command regardless. |
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. |
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.
The text was updated successfully, but these errors were encountered: