Sublime Forum

The `toggle_comment` command does not seem to work

#1

Hello,

Here is my issue, since this morning, I cannot comment lines with the usual cmd-/ key bind (I am using macOs 12.2.1).

To test a little bit what is happening I did the following thing:

  • create a Default.sublime-keymap file in the Packages/User folder and wrote the following lines:
[
	{ "keys": ["command+/"], "command": "toggle_comment"},
]

(eventhough a similar line exists in the default file).
When I try to press cmd-/ in a file that has been identified as a python file nothing happens.
If I look at the output from the Console, here is what I get:

no command for selector: noop:

Now, to check where the issue comes from, I decided to modify the Default.sublime-keymap refered to as follow:

[
	{ "keys": ["command+/"], "command": "select_all"},
]

When doing so I get the expected behaviour and all the text is selected.
Moreover, there is no output in the Console.

(Note that if I try to comment in a c++ identified file, nothing happens either)

Any idea?

Thanks a lot,
Léo

0 Likes

#2

Have you tried safe mode?

0 Likes

#3

I hadn’t tried in safe mode before.
While doing so, it is working as intended in safe mode indeed.
I am not sure what I have done to break that in particular :confused:.

0 Likes

#4

Either a package or your custom keybindings have overridden that keybinding. I suggest using the "ignored_packages" setting to narrow down the culprit.

0 Likes

#5

Sorry for my ignorance but I am not sure what it means really.

Another weird behaviour (I think) is that I don’t have access to preferences and the Font menu is empty. (see screenshot).

This is not the case in Safe Mode.

Maybe reinstalling the whole thing would work, though I would have liked to know what was happening.

0 Likes

#6

That looks like plugins are failing to load entirely, i suggest checking the Sublime Text Console for errors.

0 Likes