1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 16:17:59 +01:00

Make abbreviations expand on quotes as well as space.

Also added rough documentation for insert mode.

TODO: Abbreviations should also expand on <CR> and <Tab>, but right now
adding <CR> to the mappings.add() has no effect, and adding <Tab> to the
mappings.add() breaks tab completion.

TODO: Rather than listing non-keyword characters in two places (ui.js
and mappings.js), they should be specified in one location (that could
someday be trumped by an 'iskeyword' option).
This commit is contained in:
Ted Pavlic
2009-01-20 10:41:19 -05:00
parent 3abd88276e
commit 9993f0594e
6 changed files with 54 additions and 12 deletions

View File

@@ -878,8 +878,15 @@ function CommandLine() //{{{
["<C-c>"], "Focus content",
function () { events.onEscape(); });
// Any "non-keyword" character triggers abbreviation expansion
// TODO: Add "<CR>" and "<Tab>" to this list
// At the moment, adding "<Tab>" breaks tab completion. Adding
// "<CR>" has no effect.
// TODO: Make non-keyword recognition smarter so that there need not
// be two lists of the same characters (one here and a regexp in
// mappings.js)
mappings.add(myModes,
["<Space>"], "Expand command line abbreviation",
["<Space>", '"', "'"], "Expand command line abbreviation",
function ()
{
commandline.resetCompletions();