Sublime Forum

Preferences greyed out in OS X

#15

Same here. And it doesn’t always happen. It seems to only happen on occasions, and usually if you restart ST2 one or two times, it goes away.

0 Likes

#16

I just checked in on this issue having mentioned something in December about it. I did try resetting to fresh install as suggested, but no luck there either. My problem isn’t that it comes and goes, it’s that it’s never been active, period. Such a weird challenge. I checked and it does work on my Mac at home, but not at work.

0 Likes

#17

I ran into this today and found that it was because my symlink for subl was in /opt/bin rather than ~/bin. So, if I launched the ST app from LaunchPad, finder, I would see Preferences enabled. If I ran from terminal it was disabled. So, I just moved the symlink to my folder.

HTH,
Mark

0 Likes

#18

Happens to me too, but only if I’m trying to do things as ST2 is launching, like opening the command palette or trying to open preferences. It doesn’t happen necessarily consistently (it occurs far more often when ST2 takes a while to launch), but relaunching always fixes the problem. Key bindings for opening preferences still work (Command-Comma will open my preferences), it’s just that the menu item is disabled and grayed out.

0 Likes

#19

I’m seeing the same problem with Mountain Lion and unfortunately restarting Sublime or even a reboot isn’t resolving the problem. Is there any chance this is going to get resolved anytime soon??? Based on the Forum, its been an issue for over a year

0 Likes

#20

I experienced the same problem, and I tracked it down to be when I was running “SecondBar” to display the menu bar on multiple screens.

Mike

0 Likes

#21

That works, but it’s impractical. This happens on a daily basis.

Edit: referencing an earlier post which implicated SecondBar as a possible cause: I closed SecondBar, closed ST2 and re-opened, and sure enough, Preferences is no longer grayed-out. I was able to re-open SecondBar, and Preferences is still usable.

I suppose at some point it will go away again, but perhaps now I have a work-around.

0 Likes

#22

OS X 10.8.3 - My Preferences item is also ghosted in a hit or miss way. Sometimes restarting ST2 fixes it. This morning it didn’t. Terminating SecondBar corrected the issue.

Then, I restarted SecondBar, quit ST2, restarted ST2 and the problem recurred. Hope this helps your troubleshooting.

All my best,

Jay

0 Likes

#23

I’m a new Sublime user. I saw the potential on my Windows machine. Went to set up my MacBook. Any time I add a package, including the Package Controller—using the command method—the Preferences menu becomes disabled. I deleted (i.e., reverted) the user install and tried again. I tried to manually add SFTP without having installed Package Controller; as soon as I did, the Prefs were disabled (so I couldn’t configure SFTP). Not sure what is making Sublime decide not to enable the Prefs menus. I guess I’ll have to give up using Sublime on OSX, for now.

OSX 10.8.2, Sublime, 2.0.2 2221.

0 Likes

#24

Yeah this issue is still occurring in 2018 with Sublime Text 3 build 3143 on MacOS High Sierra 10.13.3 (17D47).

2 Likes

#25

The same thing happened to me on MacOS High Sierra, and after going through my installed packages, removing “Hex Viewer” seemed to do the trick. It also had a small error in the console (view->console), so it was one of the first i tried to remove.

0 Likes

#26

Can you provide the full contents of your Sublime Text console?

0 Likes

#27

Considering that I run macOS all the time, and am the author of HexViewer, I am doubtful that HexViewer is the cause. In general, macOS occasionally runs into this case. Race condition maybe?

Sublime has a couple of race conditions that are still outstanding. One big one is events sometime accessing view.settings().get('some_setting', 'default') and it returning a None for no reason. It wouldn’t surprise me that HexViewer was throwing something like this. I’m constantly playing whack-a-mole with cases like this and putting additional logic to handle None cases because I can’t rely on Sublime to always give me a proper default. Though I think this is also related to Sublime initializing events before everything is properly setup behind the scenes with settings on Sublime startup. I make it sound like it happens a lot though, but these cases are still rare, but they keep popping up still.

0 Likes

#28

I full restart of the computer fixed the problem.

0 Likes

#29

Interesting. I haven’t heard or or seen mention of this before. Is it only in specific situations (like in plugin_loaded())?

0 Likes

#30

I think it only has a chance of occurring at startup, but I’m not 100% sure. I believe it only applies to accessing a value not currently in view.settings. It seems like there is a weird case where any setting you attempt to access that does not exist will return None despite what you give as a default. But it is very sporadic as other times we don’t get None.

Some of my plugins will write info to the view.settings to access view specific info later, so I’d expect if they haven’t been set yet, that you’d get the manually provided default instead of None.

I’m not usually accessing view specific settings directly in plugin_loaded. I’m either accessing them in normal sublime commands, Sublime events, things like that. I may access them from a function that is called from a thread, but the thread kicks off this action by calling sublime.set_timeout or sublime.set_timeout_async and usually only once a normal sublime event has communicated that it has processed an event that we need to take action on.

0 Likes

#31

I had this problem today. Restarting Sublime Text did not help, but the mentions of SecondBar above led me to try quitting and restarting Bartender, which did the trick!

0 Likes

#32

A great answer to this question would be, How does a plugin cause the Preferences menu to be disabled? Does a plugin have the ability to override the menubar in that manner?

I don’t want to disable all my plugins one at a time looking for the answer to this question. Currently the only answer is a reboot. A REBOOT!? And that’s only good until the next time.

0 Likes

#33

There isn’t any evidence so far that a plugin is going that. There have been some suggestions that third-party Mac apps may be causing issues.


If anyone can reproduce the issue and fix it by removing third-party packages, I’d be grateful if you can identify which plugin is causing the issue, so we can look into how that could be happening.

0 Likes

#34

Here are some findings from my side. I have to remove

~/Library/Application Support/Sublime Text 3/Lib/python3.3

and

~/Library/Application Support/Sublime Text 3/Installed Packages/PyV8

both get re-created when I restart Sublime Text. When these are there, then the Preferences menu is greyed out. If I remove then and then start Sublime Text, I can access the Preferences menu, until, I quit Sublime Text and forget removing them.

So it has something to do with python, but I’ve no idea how.

Also, I’ve some packages installed, but besides the PyV8, which gets re-created, none of the others seem to hurt by themselves.

0 Likes