ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Project​Completions

by bordaigorl ST2/ST3

Project Completions plugin for Sublime Text

Details

Installs

  • Total 692
  • Win 362
  • OS X 173
  • Linux 157
Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2
Windows 1 0 0 1 1 0 1 1 0 0 0 0 1 0 0 0 2 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 1 0 0 1 0 0 0 1 0 1 0 0 0 2
OS X 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 3 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0
Linux 0 1 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 2 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Project Completions plugin

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.

Simple list

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.

By Scope

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.

Example

{
  "folders": ...
  "completions":[
      ["I", "I am a ${1:snippet} baby!"]
  ]
}

To see the example in action type I and then press tab:

Animated Gif

Thanks

Thanks to Amina for inspiring this plugin.