Created
April 7, 2011 08:42
-
-
Save teramako/907349 to your computer and use it in GitHub Desktop.
[Vimperator]semiAutoComplete (テキトウにコードを書いていたらタブを押して初めて自動補完が有効になるコードとなった
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let (cl = commandline) { | |
cl._autocompleteTimer = new Timer(200, 500, function autocompleteTell(tabPressed) { | |
if (events.feedingKeys || !options["autocomplete"]) | |
return; | |
if (!this._completions && this._commandWidget.value.length >= 2) { | |
this._completions = CommandLine.Completions(this._commandWidget.inputField); | |
this._completions.complete(false, false); | |
} | |
let ctx = this._completions.context; | |
let argsContext = ctx.contexts["/ex/args"]; | |
if (argsContext && argsContext.filter.length >= 3) { | |
this._completions.complete(true, false); | |
this._completions.itemList.show(); | |
return; | |
} | |
//this.resetCompletions(); | |
//this._completions = null; | |
this._completionList.hide(); | |
}.bind(cl)); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment