Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Installing and uninstalling breaks Sublime's sidebar context menu #18

Closed
lencioni opened this Issue · 13 comments
@lencioni

I installed SideBarEnhancements and then removed it. Then I noticed that my regular sidebar context menu no longer worked.

After poking around in my Packages folder, I figured out why. In my default package, there is a file called Side Bar.sublime-menu and its entire contents had been commented out:

[/*[
    { "caption": "New File", "command": "new_file_at", "args": {"dirs": []} },
    { "caption": "Rename…", "command": "rename_path", "args": {"paths": []} },
    { "caption": "Delete File", "command": "delete_file", "args": {"files": []} },
    { "caption": "Open Containing Folder…", "command": "open_containing_folder", "args": {"files": []} },
    { "caption": "-", "id": "folder_commands" },
    { "caption": "New Folder…", "command": "new_folder", "args": {"dirs": []} },
    { "caption": "Delete Folder", "command": "delete_folder", "args": {"dirs": []} },
    { "caption": "Find in Folder…", "command": "find_in_folder", "args": {"dirs": []} },
    { "caption": "-", "id": "end" }
]
*/]

To get my context menu back, I had to remove the commenting out so it looks like this:

[
    { "caption": "New File", "command": "new_file_at", "args": {"dirs": []} },
    { "caption": "Rename…", "command": "rename_path", "args": {"paths": []} },
    { "caption": "Delete File", "command": "delete_file", "args": {"files": []} },
    { "caption": "Open Containing Folder…", "command": "open_containing_folder", "args": {"files": []} },
    { "caption": "-", "id": "folder_commands" },
    { "caption": "New Folder…", "command": "new_folder", "args": {"dirs": []} },
    { "caption": "Delete Folder", "command": "delete_folder", "args": {"dirs": []} },
    { "caption": "Find in Folder…", "command": "find_in_folder", "args": {"dirs": []} },
    { "caption": "-", "id": "end" }
]

My Side Bar Mount Point.sublime-menu file was commented out:

[/*[
    { "caption": "-", "id": "folder_commands" },
    { "caption": "Remove Folder from Project", "command": "remove_folder", "args": { "dirs": []} }
]
*/]

I had to fix this as well:

[
    { "caption": "-", "id": "folder_commands" },
    { "caption": "Remove Folder from Project", "command": "remove_folder", "args": { "dirs": []} }
]

At minimum, this should be documented (forgive me if it is). Ideally, SideBarEnhancements shouldn't alter the defaults, or it should fix them when getting removed (if that is possible).

@titoBouzout
Owner

Is not possible to listen for when a package is removed.

I'll link to this thread from the readme.md file.

Thanks.

@arieperini

How create multiple folder in command?

@fastzhong

how to remove (not delete) the folder ?

@chitsaou

I've fixed this issue by uncommenting menu items. But I found that there is still something weird in the context menu:

There is a menu item with empty title containing a sub menu which has all items disabled.

Could anyone help me fix this issue? Thanks.

@chitsaou

Ok, I got a workaround.

I deleted Packges/User/SideBarEnhancements then restart Sublime Text 2, then this strange menu disappeared.

@Apathetic012

This fu***ed up my context menu. When I uninstalled I realized the same thing. I followed your instructions above but my context menu still won't work on the sidebar.

@WMeldon

Just some added clarification on this. Removing the just the /* will not bring the old context menu back. You also have to remove the extra brackets outside of the comments. This is shown in the process but not clearly explained.

It seems intuitive but it took me a minute to realize.

@surfjedi

I am having the same issue but after having done the above and restarting I still have no sidebar menu.

Here's my files:
[
{ "caption": "New File", "command": "new_file_at", "args": {"dirs": []} },
{ "caption": "Rename…", "command": "rename_path", "args": {"paths": []} },
{ "caption": "Delete File", "command": "delete_file", "args": {"files": []} },
{ "caption": "Open Containing Folder…", "command": "open_containing_folder", "args": {"files": []} },
{ "caption": "-", "id": "folder_commands" },
{ "caption": "New Folder…", "command": "new_folder", "args": {"dirs": []} },
{ "caption": "Delete Folder", "command": "delete_folder", "args": {"dirs": []} },
{ "caption": "Find in Folder…", "command": "find_in_folder", "args": {"dirs": []} },
{ "caption": "-", "id": "end" }
]

and

[
{ "caption": "-", "id": "folder_commands" },
{ "caption": "Remove Folder from Project", "command": "remove_folder", "args": { "dirs": []} }
]

any ideas?

@darylknight

Thanks lencioni - this really annoyed me when I uninstalled it

@g-dexterous

I am facing the same issue, Just as Surfjedi mentioned, even after removing the comments from the two files my default menu is not coming back.

@emgiezet

just happend to me after update.

@emgiezet

reinstalled and it's ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.