mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 02:57:59 +01:00
Move the standard type completers to appropriate modules.
This commit is contained in:
@@ -565,6 +565,23 @@ function Editor() //{{{
|
||||
addAbbreviationCommands("i", "insert");
|
||||
addAbbreviationCommands("c", "command line");
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////}}}
|
||||
////////////////////// COMPLETIONS /////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////{{{
|
||||
|
||||
liberator.registerObserver("load_completion", function () {
|
||||
// TODO: shouldn't all of these have a standard signature (context, args, ...)? --djk
|
||||
completion.abbreviation = function abbreviation(context, args, mode) {
|
||||
mode = mode || "!";
|
||||
|
||||
if (args.completeArg == 0)
|
||||
{
|
||||
let abbreviations = editor.getAbbreviations(mode);
|
||||
context.completions = [[lhs, ""] for ([, [, lhs,]] in Iterator(abbreviations))];
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////}}}
|
||||
////////////////////// PUBLIC SECTION //////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////{{{
|
||||
|
||||
Reference in New Issue
Block a user