Sublime Forum

Key Bindings not working

#1

I have the below key bindings:

{ "keys": ["alt+shift+t"], "command": "title_case" },
{ "keys": ["alt+shift+s"], "command": "snake_case" },
{ "keys": ["alt+shift+l"], "command": "lowerCamelCase" },
{ "keys": ["alt+shift+u"], "command": "UpperCamelCase" },

Except for the title_case, the other three are not working, I’m sure there is no keys conflicts too. Can anyone help?

0 Likes

#2

The simplest way to get the command name / args triggered by a menu item is

  1. execute sublime.log_commands(True) in ST console
  2. execute the menu item
  3. see ST console

Btw, https://packagecontrol.io/packages/Case%20Conversion

2 Likes

How to key-bind "kebab-case" function
#3

Hi, I can see the command is
command: convert_ident_case {"case": "lower", "separator": "_"}

May I know how is the key binding looks like for this?

Because the command is not like the usual one. For example:
{ "keys": ["alt+shift+t"], "command": "title_case" },

0 Likes

#4
{ 
    "keys": ["alt+shift+t"], 
    "command": "convert_ident_case",
    "args": {"case": "lower", "separator": "_"}
},
2 Likes