AlternativeAutocompletion
Fuzzy word completion, based on the contents of the current file.
Details
Installs
- Total 3K
- Win 2K
- Mac 497
- Linux 507
| Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | 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 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 0 | 2 | 2 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Alternative autocompletion
This plugin adds an autocompletion command to Sublime Text that acts similarly to TextMate:
- Hitting the autocomplete key will attempt to complete the current word by looking at similar words in the current document.
- Hitting the autocomplete key multiple times will cycle through the available words.
- The last autocomplete position is remembered, so you can perform an autocompletion, move the cursor around, move back to where you were, and continue cycling through the completions.
- Candidate completions are selected prioritized by distance to the cursor.
The plugin improves on TextMate in one respect: If no candidates are found, the
plugin reverts to using a simple fuzzy, case-sensitive matching algorithm that
is similar to Sublime's file/class matching algorithm. For example, typing
AppC might match ApplicationController.
Installation
Using Package Control, install “AlternativeAutocompletion” or clone this repo in your packages folder.
I recommended you add key bindings for the commands. I've included my preferred bindings below. Copy them to your key bindings file (⌘⇧,).
Key Bindings
Copy these to your user key bindings file.
{ "keys": ["escape"], "command": "alternative_autocomplete", "context":
[
{ "key": "num_selections", "operator": "equal", "operand": 1 },
{ "key": "panel_visible", "operator": "equal", "operand": false },
{ "key": "overlay_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 }
]
},
{ "keys": ["tab"], "command": "alternative_autocomplete", "args": {"tab": true}, "context":
[
{ "key": "num_selections", "operator": "equal", "operand": 1 }
]
},
{ "keys": ["tab"], "command": "next_field", "context":
[
{ "key": "has_next_field", "operator": "equal", "operand": true }
]
},
{ "keys": ["shift+tab"], "command": "alternative_autocomplete", "args": {"tab" : true, "cycle": "previous"}, "context":
[
{ "key": "num_selections", "operator": "equal", "operand": 1 }
]
},
{ "keys": ["shift+tab"], "command": "prev_field", "context":
[
{ "key": "has_prev_field", "operator": "equal", "operand": true }
]
},
Limitations
Currently does not work with multiple selections.
License
Copyright 2011 Alexander Staubo. MIT license. See LICENSE file for license.
Modified by Colin Gray