alexstaubo/sublime_text_alternative_autocompletion — Issue #7: Keybinding example breaks some default functionality
Author: Grepsy
Created: 2011-12-05 11:22:17+00:00
State: open

The sample keybinding disables backing out of a snippet using escape and closing a panel(for example find), I've fixed this by adding some (more) exceptions to the context, might give a better experience. Thanks for the plugin, love it!

```javascript
// Alternative auto-complete
{ "keys": ["escape"], "command": "alternative_autocomplete", "context":
[
{ "key": "num_selections", "operator": "equal", "operand": 1 },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
{ "key": "panel_visible", "operator": "equal", "operand": false },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "has_next_field", "operator": "equal", "operand": false }
]
},
{ "keys": ["shift+escape"], "command": "alternative_autocomplete", "args": {"cycle": "previous"}, "context":
[
{ "key": "num_selections", "operator": "equal", "operand": 1 },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
{ "key": "panel_visible", "operator": "equal", "operand": false },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "has_next_field", "operator": "equal", "operand": false }
]
}
```