This plugin lets you add project-specific completion snippets to your .sublime-project
files.
Install the plugin via Package Control and you can add project-specific completions via the completions
key in your .sublime-project
file.
Completions can be specified in two formats.
Just a list of [trigger, completion]
items:
{
"folders": ...
"completions": [
[trigger, completion],
...
[trigger, completion]
]
}
where trigger
is the prefix that triggers the completion (and can contain a caption separated by \t
) and completion
is a snippet.
For more information about the syntax of completions see the Unofficial Documentation.
Using this syntax, the completions will always be available in the project.
A dictionary with scopes as keys and lists of completions as values:
{
"folders": ...
"completions": {
selector: [
[trigger, completion],
...
[trigger, completion]
],
...
selector: [
[trigger, completion],
...
[trigger, completion]
]
}
In this case only the completions associated with selectors matching the current scope will be suggested. For more info about scope selectors see the Unofficial Documentation.
{
"folders": ...
"completions":[
["I", "I am a ${1:snippet} baby!"]
]
}
To see the example in action type I and then press tab: