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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user