sublime-phpck icon indicating copy to clipboard operation
sublime-phpck copied to clipboard

completions should be context-aware

Open dakira opened this issue 8 years ago • 2 comments

When I create a blank PHP file, the first thing I enter is <?php at this point the completions trigger and offer me phpunit. So when I just press enter, everything is messed up. I need to press ESC first for every single PHP file I create.

dakira avatar May 30 '17 17:05 dakira

Use the auto_complete_commit_on_tab setting to avoid commit of completions on Enter.

// By default, auto complete will commit the current completion on enter.
// This setting can be used to make it complete on tab instead.
// Completing on tab is generally a superior option, as it removes
// ambiguity between committing the completion and inserting a newline.
"auto_complete_commit_on_tab": false,

Set it globally Preferences > Settings

{
    "auto_complete_commit_on_tab": true
}

Set it per-project: Project > Edit Project

{
    "settings": {
        "auto_complete_commit_on_tab": true
    }
}

Nonetheless, this is still bug because the completions should be context aware enough not to trigger in irrelevant contexts like the one you describe.

gerardroche avatar May 31 '17 14:05 gerardroche

@gerardroche thx for the workaround.. didn't know about that setting.

dakira avatar May 31 '17 14:05 dakira