Sublime Forum

Thesaurus // [ctrl+t]

#1

I installed it from the PM. Love the plugin, wish it had the ability to replace the word with the word I’ve selected, but I’ll save that for a different post. :slightly_smiling:

For this post, I just cannot find the [ctrl-t] [ctrl+t] keybinding. I’ve even tried to use grep to find it.

Even if I go into my user keybindings, and change it to:
{ “keys”: [“ctrl+alt+t”], “command”: “thesaurus” }

The ctrl+t still works as the keybinding.

Is it possible that it is hard-coded in the “Thesaurus.sublime-package”?

– np

edit { “keys”: [“ctrl+t”], “command”: “transpose” },

I of course found the transpose key, and can change or disable it… but it still doesn’t help me to locate the overriding ctrl+t from the thesaurus plugin.

0 Likes

#2

On OSX, the binding is “command+t”, on the others it is “ctrl+t”. Are you sure the package installed and loaded correctly?

0 Likes

#3

It’s installed correctly, and it works fine. I am just trying to locate the ctrl+t keybinding for it. Because I want to change it.

Seems like I found a solution. As the ctrl+t key is a built in bind for transpose.

{ "keys": ["ctrl+t"], "command": "unbound" }, { "keys": ["ctrl+t+h"], "command": "thesaurus" }

This eliminates the conflict of both ctrl-t keys bound at the same time. As the one that comes with the Thesaurus is hard-coded into the plugin.

So I disabled the key altogether and changed the thesaurus to something more appropriate.

– np

edit and just for fun, even though I will never use it… I added back the transpose:
{ "keys": ["ctrl+t"], "command": "unbound" }, { "keys": ["ctrl+t+h"], "command": "thesaurus" }, { "keys": ["ctrl+t+r"], "command": "transpose" }

0 Likes

#4

This is the important information that was missing from your post. You never mentioned what you wanted to bind it to.

0 Likes

#5

To be fair, the reason for the post at all, was that I did create a new keybinding for the thesaurus. That created the problem. The problem that, here I have created a keybinding for the thesaurus to something else, and yet, the thesaurus still worked when I pressed ctrl+t …?

That was the initial problem.

edit
Problem is in the thesaurus plugin itself. Where it has a hard-coded key binding.

0 Likes

#6

Ah, this is what you mean. Yeah, key bindings are many-to-many, technically. The first many is more complex with multiple bindings for the same key, but the same command can be referenced an indefinite amount of times.

The only way to “remove” a binding is to create a new one that overrides the old (or remove the binding from where it was defined, i.e. within the package).

0 Likes

#7

I agree that is how it should work, but not in this case. As I created a simple user keybinding, for CTRL-T, to be something else… yet, the thesaurus still worked when I pressed CTRL-T… so that is where my confusion began.

This is where I had to come up with disabling the key binding altogether, that was the only way I could stop the thesaurus from functioning when I pressed CTRL-T.

Hope that makes sense.

– np

0 Likes