Hi all
Has anybody had any success with getting a snippet to work without having to press TAB using keyEquivalent in a tmSnippet file??
Many thanks for any advice
Anthony
{ "keys": ["#"], "command": "insert_snippet", "args": {"contents": "#{${1:$TM_SELECTED_TEXT}}"}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "(string.quoted.double.ruby|string.interpolated.ruby) - string source" }
]
}aunderwo wrote:Please could you point me to an example of where an explicit keybinding is used to activate a Snippet.Also would this still respect the scope specified in the snippet? in my case within doublequoted strings?
Thanks
I've just dug around and found this for myself
To add a ruby interpolation snippet add the following into the User sublime-keymap file
- Code: Select all
{ "keys": ["#"], "command": "insert_snippet", "args": {"contents": "#{${1:$TM_SELECTED_TEXT}}"}, "context":
[
{ "key": "selector", "operator": "equal", "operand": "(string.quoted.double.ruby|string.interpolated.ruby) - string source" }
]
}
Users browsing this forum: No registered users and 5 guests