Sublime Forum

[solved] mode / scope specific key binding?

#1

Hello (lot’s of questions today),

I would like to insert my own keybindings for a specific scope (text.tex.latex). My binding looks like this:

	{ "keys": "ctrl+x", "ctrl+i"], "command": "insert_snippet", "args": {"name": "Packages/User/mysnippet.sublime-snippet"} }
]

Now where should I put this information? How do I select the scope?

Thanks

anhil

0 Likes

#2

[quote=“anhil”]Hello (lot’s of questions today),

I would like to insert my own keybindings for a specific scope (text.tex.latex). My binding looks like this:

	{ "keys": "ctrl+x", "ctrl+i"], "command": "insert_snippet", "args": {"name": "Packages/User/mysnippet.sublime-snippet"} }
]

Now where should I put this information? How do I select the scope?

Thanks

anhil[/quote]

I’ve got it to work:

	{ "keys": "ctrl+x", "ctrl+i"], 
	  "command": "insert_snippet", 
	  "args": {"name": "Packages/User/mysnippet.sublime-snippet"},
	  "context":  {"key": "selector", "operator": "equal", "operand": "text.tex.latex"} ]
	}
]
0 Likes