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

add rough initial implementations of :message, g< (gm for now) and 'messages'

This commit is contained in:
Doug Kearns
2008-09-27 12:33:23 +00:00
parent 8154f7b5fa
commit 675ae16f24
13 changed files with 253 additions and 101 deletions

3
NEWS
View File

@@ -1,10 +1,13 @@
<pre>
2008-XX-XX:
* version 2.0 (probably)
* IMPORTANT: 'verbose' is now used for message levels. Logging is
controlled by the extensions.liberator.loglevel preference.
* IMPORTANT: :viusage and :exusage now jump to the help index, use the
special versions for the old behavior
* IMPORTANT: renamed Startup and Quit autocmd events to VimperatorEnter and
VimperatorLeave respectively
* add :messages and 'messages'
* add :runtime
* add 'runtimepath'
* allow ; hints to work in the multiline output widget

View File

@@ -242,6 +242,8 @@ liberator.AutoCommands = function () //{{{
if (events.some(function (event) event == "all" || event == auEvent))
return;
liberator.echomsg("Executing " + auEvent + " Auto commands for \"*\"", 8);
if (autoCommands[auEvent])
{
for (let i = 0; i < autoCommands[auEvent].length; i++)
@@ -494,7 +496,7 @@ liberator.Events = function () //{{{
}
else // background tab
{
liberator.commandline.echo("Background tab loaded: " + title || url, liberator.commandline.HL_INFOMSG);
liberator.echomsg("Background tab loaded: " + title || url, 1);
}
}
}
@@ -557,8 +559,7 @@ liberator.Events = function () //{{{
{
for (let [,dir] in Iterator(dirs))
{
if (liberator.options["verbose"] >= 2)
liberator.echo("Searching for \"macros/*\" in \"" + dir.path + "\"\n");
liberator.echomsg("Searching for \"macros/*\" in \"" + dir.path + "\"", 2);
liberator.log("Sourcing macros directory: " + dir.path + "...", 3);

View File

@@ -375,9 +375,11 @@ liberator.Search = function () //{{{
// our command line
setTimeout(function () {
if (up)
liberator.commandline.echo("search hit TOP, continuing at BOTTOM", liberator.commandline.HL_WARNINGMSG);
liberator.commandline.echo("search hit TOP, continuing at BOTTOM",
liberator.commandline.HL_WARNINGMSG, liberator.commandline.APPEND_TO_MESSAGES);
else
liberator.commandline.echo("search hit BOTTOM, continuing at TOP", liberator.commandline.HL_WARNINGMSG);
liberator.commandline.echo("search hit BOTTOM, continuing at TOP",
liberator.commandline.HL_WARNINGMSG, liberator.commandline.APPEND_TO_MESSAGES);
}, 0);
}
else

View File

@@ -273,6 +273,10 @@ liberator.IO = function () //{{{
// : unify with startup sourcing loop
let paths = args.arguments;
let runtimeDirs = liberator.options["runtimepath"].split(",");
let found = false;
// FIXME: should use original arg string
liberator.echomsg("Searching for \"" + paths.join(" ") + "\" in \"" + liberator.options["runtimepath"] + "\"", 2);
outer:
for (let [,runtimeDir] in Iterator(runtimeDirs))
@@ -281,8 +285,11 @@ liberator.IO = function () //{{{
{
let file = liberator.io.getFile(joinPaths(runtimeDir, path));
liberator.echomsg("Searching for \"" + file.path + "\" in \"", 3);
if (file.exists() && file.isReadable() && !file.isDirectory()) // XXX
{
found = true;
liberator.io.source(file.path, false);
if (!special)
@@ -290,6 +297,9 @@ liberator.IO = function () //{{{
}
}
}
if (!found)
liberator.echomsg("not found in 'runtimepath': \"" + paths.join(" ") + "\"", 1); // FIXME: should use original arg string
},
{ argCount: "+" }
);
@@ -696,8 +706,10 @@ lookup:
// when https://bugzilla.mozilla.org/show_bug.cgi?id=68702 is fixed
// is fixed, should use that instead of a tmpfile
system: function (str, input)
system: function (command, input)
{
liberator.echomsg("Calling shell to execute: " + command, 4);
var stdoutFile = ioManager.createTempFile();
var stderrFile = ioManager.createTempFile();
@@ -707,10 +719,9 @@ lookup:
return "";
if (WINDOWS)
var command = str + " > " + stdoutFile.path + " 2> " + stderrFile.path;
command += " > " + stdoutFile.path + " 2> " + stderrFile.path;
else
var command = str + " > \"" + escapeQuotes(stdoutFile.path) + "\""
+ " 2> \"" + escapeQuotes(stderrFile.path) + "\"";
command += " > \"" + escapeQuotes(stdoutFile.path) + "\"" + " 2> \"" + escapeQuotes(stderrFile.path) + "\"";
var stdinFile = null;
@@ -754,7 +765,9 @@ lookup:
if (!silent)
{
if (file.isDirectory())
liberator.echo("Cannot source a directory: \"" + filename + "\"\n");
liberator.echomsg("Cannot source a directory: \"" + filename + "\"", 0);
else
liberator.echomsg("could not source: \"" + filename + "\"", 1);
liberator.echoerr("E484: Can't open file " + filename);
}
@@ -762,6 +775,8 @@ lookup:
return;
}
liberator.echomsg("sourcing \"" + filename + "\"", 2);
var str = ioManager.readFile(file);
// handle pure javascript files specially
@@ -833,6 +848,8 @@ lookup:
if (scriptNames.indexOf(file.path) == -1)
scriptNames.push(file.path);
liberator.echomsg("finished sourcing \"" + filename + "\"", 2);
liberator.log("Sourced: " + file.path, 3);
}
catch (e)

View File

@@ -94,10 +94,10 @@ const liberator = (function () //{{{
"boolean", true);
liberator.options.add(["verbose", "vbs"],
"Define which type of messages are logged",
"Define which info messages are displayed",
"number", 0,
{
validator: function (value) value >= 0 && value <= 9
validator: function (value) value >= 0 && value <= 15
});
liberator.options.add(["visualbell", "vb"],
@@ -785,7 +785,25 @@ const liberator = (function () //{{{
echo: function (str, flags) { liberator.commandline.echo(str, liberator.commandline.HL_NORMAL, flags); },
echoerr: function (str, flags) { liberator.commandline.echo(str, liberator.commandline.HL_ERRORMSG, flags); },
// TODO: Vim replaces unprintable characters in echoerr/echomsg
echoerr: function (str, flags)
{
flags |= liberator.commandline.APPEND_TO_MESSAGES;
liberator.commandline.echo(str, liberator.commandline.HL_ERRORMSG, flags);
},
// TODO: add proper level constants
echomsg: function (str, verbosity, flags)
{
flags |= liberator.commandline.APPEND_TO_MESSAGES;
if (verbosity == null)
verbosity = 0; // verbosity level is exclusionary
if (liberator.options["verbose"] >= verbosity)
liberator.commandline.echo(str, liberator.commandline.HL_INFOMSG, flags);
},
// return true, if this VIM-like extension has a certain feature
has: function (feature)
@@ -853,15 +871,16 @@ const liberator = (function () //{{{
// logs a message to the javascript error console
// if msg is an object, it is beautified
// TODO: add proper level constants
log: function (msg, level)
{
var verbose = 0;
if (typeof level != "number")
if (typeof level != "number") // XXX
level = 1;
// liberator.options does not exist at the very beginning
if (liberator.options)
verbose = liberator.options["verbose"];
verbose = liberator.options.getPref("extensions.liberator.loglevel", 0);
if (level > verbose)
return;
@@ -871,7 +890,7 @@ const liberator = (function () //{{{
var consoleService = Components.classes["@mozilla.org/consoleservice;1"]
.getService(Components.interfaces.nsIConsoleService);
consoleService.logStringMessage("vimperator: " + msg);
consoleService.logStringMessage(liberator.config.name.toLowerCase() + ": " + msg);
},
// open one or more URLs
@@ -1080,8 +1099,7 @@ const liberator = (function () //{{{
for (let [,dir] in Iterator(dirs))
{
// TODO: search plugins/**/* for plugins
if (liberator.options["verbose"] >= 2)
liberator.echo("Searching for \"plugin/*.{js,vimp}\" in \"" + dir.path + "\"\n");
liberator.echomsg("Searching for \"plugin/*.{js,vimp}\" in \"" + dir.path + "\"", 2);
liberator.log("Sourcing plugin directory: " + dir.path + "...", 3);

View File

@@ -209,7 +209,7 @@ liberator.Options = function () //{{{
function loadPreference(name, forcedDefault, defaultBranch)
{
var defaultValue = null;
var defaultValue = null; // XXX
if (forcedDefault != null) // this argument sets defaults for non-user settable options (like extensions.history.comp_history)
defaultValue = forcedDefault;

View File

@@ -43,7 +43,6 @@ liberator.CommandLine = function () //{{{
liberator.storage.newArray("history-search", true);
liberator.storage.newArray("history-command", true);
// TODO: clean this up when it's not 3am...
var history = {
get mode() (liberator.modes.extended == liberator.modes.EX) ? "command" : "search",
@@ -67,6 +66,34 @@ liberator.CommandLine = function () //{{{
var historyIndex = UNINITIALIZED;
var historyStart = "";
var messageHistory = {
_messages: [],
get messages()
{
let max = liberator.options["messages"];
// resize if 'messages' has changed
if (this._messages.length > max)
this._messages = this._messages.splice(this._messages.length - max);
return this._messages;
},
get length() this._messages.length,
add: function (message)
{
if (!message)
return;
if (this._messages.length >= liberator.options["messages"])
this._messages.shift();
this._messages.push(message);
}
};
var lastMowOutput = null;
var completionList = new liberator.ItemList("liberator-completions");
var completions = [];
// for the example command "open sometext| othertext" (| is the cursor pos):
@@ -97,8 +124,8 @@ liberator.CommandLine = function () //{{{
multilineOutputWidget.contentDocument.body.id = "liberator-multiline-output-content";
// TODO: is there a better way to determine and set the UI font, 'guifont' perhaps?
var id = liberator.config.mainWindowID || "main-window";
var fontSize = document.defaultView.getComputedStyle(document.getElementById(id), null).getPropertyValue("font-size");
var mainWindowID = liberator.config.mainWindowID || "main-window";
var fontSize = document.defaultView.getComputedStyle(document.getElementById(mainWindowID), null).getPropertyValue("font-size");
multilineOutputWidget.contentDocument.body.setAttribute("style", "font-size: " + fontSize);
multilineOutputWidget.contentDocument.body.innerHTML = "";
@@ -188,6 +215,9 @@ liberator.CommandLine = function () //{{{
//outputContainer.collapsed = true;
var output = "<div class=\"ex-command-output " + highlightGroup + "\">" + str + "</div>";
lastMowOutput = output;
if (!outputContainer.collapsed)
{
// FIXME: need to make sure an open MOW is closed when commands
@@ -276,17 +306,6 @@ liberator.CommandLine = function () //{{{
////////////////////// OPTIONS /////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
liberator.options.add(["history", "hi"],
"Number of Ex commands and search patterns to store in the command-line history",
"number", 500,
{
validator: function (value) value >= 0
});
liberator.options.add(["more"],
"Pause the message list window when more than one screen of listings is displayed",
"boolean", true);
// TODO: doesn't belong in ui.js
liberator.options.add(["complete", "cpt"],
"Items which are completed at the :[tab]open prompt",
@@ -306,6 +325,28 @@ liberator.CommandLine = function () //{{{
validator: function (value) !/[^sfbhSl]/.test(value)
});
liberator.options.add(["history", "hi"],
"Number of Ex commands and search patterns to store in the command-line history",
"number", 500,
{
validator: function (value) value >= 0
});
liberator.options.add(["messages", "msgs"],
"Number of messages to store in the message history",
"number", 100,
{
validator: function (value) value >= 0
});
liberator.options.add(["more"],
"Pause the message list window when more than one screen of listings is displayed",
"boolean", true);
liberator.options.add(["showmode", "smd"],
"Show the current mode in the command line",
"boolean", true);
liberator.options.add(["suggestengines"],
"Engine Alias which has a feature of suggest",
"stringlist", "google",
@@ -331,9 +372,24 @@ liberator.CommandLine = function () //{{{
}
});
liberator.options.add(["showmode", "smd"],
"Show the current mode in the command line",
"boolean", true);
liberator.options.add(["wildignore", "wig"],
"List of file patterns to ignore when completing files",
"stringlist", "",
{
validator: function (value)
{
// TODO: allow for escaping the ","
try
{
new RegExp("^(" + value.replace(",", "|", "g") + ")$");
return true;
}
catch (e)
{
return false;
}
}
});
liberator.options.add(["wildmode", "wim"],
"Define how command line completion works",
@@ -358,25 +414,6 @@ liberator.CommandLine = function () //{{{
}
});
liberator.options.add(["wildignore", "wig"],
"List of file patterns to ignore when completing files",
"stringlist", "",
{
validator: function (value)
{
// TODO: allow for escaping the ","
try
{
new RegExp("^(" + value.replace(",", "|", "g") + ")$");
return true;
}
catch (e)
{
return false;
}
}
});
liberator.options.add(["wildoptions", "wop"],
"Change how command line completion is done",
"stringlist", "",
@@ -418,33 +455,74 @@ liberator.CommandLine = function () //{{{
["<C-]>", "<C-5>"], "Expand command line abbreviation",
function () { liberator.editor.expandAbbreviation("c"); });
// FIXME: Should be "g<" but that doesn't work unless it has a non-null
// rhs, getCandidates broken?
liberator.mappings.add([liberator.modes.NORMAL],
["gm"], "Redisplay the last command output",
function ()
{
if (lastMowOutput)
liberator.commandline.echo(lastMowOutput,
liberator.commandline.HL_NORMAL, liberator.commandline.FORCE_MULTILINE)
else
liberator.beep();
});
/////////////////////////////////////////////////////////////////////////////}}}
////////////////////// COMMANDS ////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
liberator.commands.add(["ec[ho]"],
"Display a string at the bottom of the window",
function (args)
var echoCommands = [
{
var res = echoArgumentToString(args, true);
if (res != null)
liberator.echo(res);
name: "ec[ho]",
description: "Display a string at the bottom of the window",
action: liberator.echo
},
{
completer: function (filter) liberator.completion.javascript(filter)
});
name: "echoe[rr]",
description: "Display an error string at the bottom of the window",
action: liberator.echoerr
},
{
name: "echom[sg]",
description: "Display a message at the bottom of the window saving it in the message history",
action: liberator.echomsg
}
];
liberator.commands.add(["echoe[rr]"],
"Display an error string at the bottom of the window",
function (args)
echoCommands.forEach(function (command) {
liberator.commands.add([command.name],
command.description,
function (args)
{
var str = echoArgumentToString(args, true);
if (str != null)
command.action(str);
},
{
completer: function (filter) liberator.completion.javascript(filter)
});
});
liberator.commands.add(["mes[sages]"],
"Display previously given messages",
function ()
{
var res = echoArgumentToString(args, false);
if (res != null)
liberator.echoerr(res);
},
{
completer: function (filter) liberator.completion.javascript(filter)
});
// TODO: the MOW<->command-line disjoint is really annoying
if (messageHistory.length == 1)
{
liberator.commandline.echo(messageHistory.messages[0], liberator.commandline.HL_NORMAL);
}
else if (messageHistory.length > 1)
{
let list = "";
for (let [,message] in Iterator(messageHistory.messages))
list += message + "<br/>";
liberator.commandline.echo(list, liberator.commandline.HL_NORMAL, liberator.commandline.FORCE_MULTILINE);
}
}, { argCount: "0" });
/////////////////////////////////////////////////////////////////////////////}}}
////////////////////// PUBLIC SECTION //////////////////////////////////////////
@@ -466,7 +544,7 @@ liberator.CommandLine = function () //{{{
DISALLOW_MULTILINE : 1 << 2, // if an echo() should try to use the single line
// but output nothing when the MOW is open; when also
// FORCE_MULTILINE is given, FORCE_MULTILINE takes precedence
APPEND_TO_MESSAGES : 1 << 3, // will show the string in :messages
APPEND_TO_MESSAGES : 1 << 3, // add the string to the message history
get mode() (liberator.modes.extended == liberator.modes.EX) ? "cmd" : "search",
@@ -523,7 +601,6 @@ liberator.CommandLine = function () //{{{
setLine("", this.HL_NORMAL);
},
// TODO: add :messages entry
// liberator.echo uses different order of flags as it omits the hightlight group, change v.commandline.echo argument order? --mst
echo: function (str, highlightGroup, flags)
{
@@ -540,6 +617,9 @@ liberator.CommandLine = function () //{{{
highlightGroup = highlightGroup || this.HL_NORMAL;
if (flags & this.APPEND_TO_MESSAGES)
messageHistory.add(str);
var where = setLine;
if (flags & this.FORCE_MULTILINE)
where = setMultiline;
@@ -1133,8 +1213,8 @@ liberator.ItemList = function (id) //{{{
doc.body.id = id + "-content";
var id = liberator.config.mainWindowID || "main-window";
var fontSize = document.defaultView.getComputedStyle(document.getElementById(id), null).getPropertyValue("font-size");
var mainWindowID = liberator.config.mainWindowID || "main-window";
var fontSize = document.defaultView.getComputedStyle(document.getElementById(mainWindowID), null).getPropertyValue("font-size");
doc.body.setAttribute("style", "font-size: " + fontSize);
var completions = []; // a reference to the Array of completions

View File

@@ -106,7 +106,7 @@ liberator.config = { //{{{
"buffer.html", "cmdline.html", "options.html", "pattern.html",
"tabs.html", "hints.html", "map.html", "eval.html", "marks.html",
"repeat.html", "autocommands.html", "print.html", "gui.html",
"developer.html", "various.html", "index.html"
"message.html", "developer.html", "various.html", "index.html"
],
init: function ()

View File

@@ -270,10 +270,11 @@ section:Options[option-index]
||'linkfgcolor'|| Foreground color of a link during hint mode +
||'linksearch'|| Limit the search to hyperlink text +
||'loadplugins'|| Load plugin scripts when starting up +
||'messages'|| Number of messages to store in the message history +
||'more'|| Pause the message list window when more than one screen of listings is displayed +
||'newtab'|| Define which commands should output in a new tab by default +
||'nextpattern'|| Patterns to use when guessing the 'next' page in a document sequence +
||'online'|| Set the 'work offline' option +
||'online'|| Set the \'work offline' option +
||'pageinfo'|| Desired info on :pa[geinfo] +
||'popups'|| Where to show requested popup windows +
||'preload'|| Speed up first time history/bookmark completion +
@@ -290,7 +291,7 @@ section:Options[option-index]
||'titlestring'|| Change the title of the window +
||'urlseparator'|| Set the separator regexp used to separate multiple URL args +
||'usermode'|| Show current website with a minimal style sheet to make it easily accessible +
||'verbose'|| Define which type of messages are logged +
||'verbose'|| Define which info messages are displayed +
||'visualbell'|| Use visual bell instead of beeping on errors +
||'visualbellstyle'|| CSS specification of the visual bell +
||'wildignore'|| List of file patterns to ignore when completing files +

View File

@@ -67,6 +67,7 @@ section:Help{nbsp}topics[overview]
events.
- help:Print[print.html]: Printing pages.
- help:GUI[gui.html]: Accessing Firefox menus, dialogs and the sidebar.
- help:Messages[message.html]: A description of messages and error messages.
- help:Developer{nbsp}information[developer.html]: How to write docs or
plugins.
- help:Various[various.html]: Other help which didn't fit into any other

22
locale/en-US/message.txt Normal file
View File

@@ -0,0 +1,22 @@
HEADER
|message-history| +
Vimperator stores all info and error messages in a message history. The type of
info messages output can be controlled by the 'verbose' option.
|:mes| |:messages| +
||:mes[sages]||
________________________________________________________________________________
Display previously given messages.
________________________________________________________________________________
|gm| +
||gm||
________________________________________________________________________________
Redisplay the last command output. Only the most recent commands output is
available.
________________________________________________________________________________
// vim: set syntax=asciidoc:

View File

@@ -468,6 +468,13 @@ Load plugin scripts when starting up.
____
|\'msgs'| |\'messages'|
||'messages' 'msgs'|| number (default: 100)
____
Number of messages to store in the message history.
____
|\'nomore'| |\'more'|
||'more'|| boolean (default: on)
____
@@ -708,10 +715,12 @@ ____
|\'verbose', \'vbs'|
||'verbose' 'vbs'|| number (default: 0)
____
Define which type of messages are logged.
Define which info messages are displayed.
When bigger than zero, Vimperator will give messages about what it is doing.
They are printed to the error console which can be shown with [c]:javascript![c].
The highest value is 9, being the most verbose mode.
These can be viewed at any time with the [c]:messages[c] command. The highest
value is 15, being the most verbose mode.
TODO: list levels and associated messages
____

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: VIMperator configuration file
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2008 Sep 21
" Last Change: 2008 Sep 27
if exists("b:current_syntax")
finish
@@ -13,21 +13,19 @@ set cpo&vim
syn include @javascriptTop syntax/javascript.vim
unlet b:current_syntax
syn region vimperatorString start="\z(["']\)" end="\z1" skip="\\\\\|\\\z1" oneline
syn match vimperatorCommandStart "\%(^\s*:\=\)\@<=" nextgroup=vimperatorCommand,vimperatorAutoCmd
syn keyword vimperatorCommand ab[breviate] ab[clear] addo[ns] b[uffer] ba[ck] bd[elete] beep bf[irst] bl[ast] bma[rk] bmarks
\ bn[ext] bN[ext] bp[revious] br[ewind] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] cd chd[ir] cuna[bbrev] cm[ap]
\ cmapc[lear] cno[remap] comc[lear] com[mand] cu[nmap] delbm[arks] delc[ommand] delmac[ros] delm[arks] delqm[arks] dia[log] dl
\ downl[oads] e[dit] ec[ho] echoe[rr] em[enu] exe[cute] exu[sage] fini[sh] files fo[rward] fw h[elp] ha[rdcopy] hist[ory] hs
\ ia[bbrev] iabc[lear] im[ap] imapc[lear] ino[remap] iuna[bbrev] iu[nmap] javas[cript] ju[mps] js let ls macros ma[rk] map
\ mapc[lear] marks mkv[imperatorrc] no[remap] noh[lsearch] norm[al] o[pen] pa[geinfo] pagest[yle] pc[lose] pl[ay]
\ pref[erences] prefs pw[d] q[uit] qa[ll] qma[rk] qmarks quita[ll] re[draw] re[load] reloada[ll] res[tart] run ru[ntime]
\ sav[eas] sb[ar] sb[open] sbcl[ose] scrip[tnames] se[t] setg[lobal] setl[ocal] sideb[ar] so[urce] st[op] tN[ext] t[open] tab
\ tabde[tach] tabd[uplicate] tabN[ext] tabc[lose] tabe[dit] tabfir[st] tabl[ast] tabm[ove] tabn[ext] tabnew tabo[nly] tabopen
\ tabp[revious] tabr[ewind] tabs time tn[ext] tp[revious] u[ndo] una[bbreviate] undoa[ll] unl[et] unm[ap] ve[rsion]
\ vie[wsource] viu[sage] w[rite] wc[lose] win[open] winc[lose] wine[dit] wo[pen] wqa[ll] wq xa[ll] zo[om]
\ downl[oads] e[dit] ec[ho] echoe[rr] echom[sg] em[enu] exe[cute] exu[sage] fini[sh] files fo[rward] fw h[elp] ha[rdcopy]
\ hist[ory] hs ia[bbrev] iabc[lear] im[ap] imapc[lear] ino[remap] iuna[bbrev] iu[nmap] javas[cript] ju[mps] js let ls macros
\ ma[rk] map mapc[lear] marks mes[sages] mkv[imperatorrc] no[remap] noh[lsearch] norm[al] o[pen] pa[geinfo] pagest[yle]
\ pc[lose] pl[ay] pref[erences] prefs pw[d] q[uit] qa[ll] qma[rk] qmarks quita[ll] re[draw] re[load] reloada[ll] res[tart] run
\ ru[ntime] sav[eas] sb[ar] sb[open] sbcl[ose] scrip[tnames] se[t] setg[lobal] setl[ocal] sideb[ar] so[urce] st[op] tN[ext]
\ t[open] tab tabde[tach] tabd[uplicate] tabN[ext] tabc[lose] tabe[dit] tabfir[st] tabl[ast] tabm[ove] tabn[ext] tabnew
\ tabo[nly] tabopen tabp[revious] tabr[ewind] tabs time tn[ext] tp[revious] u[ndo] una[bbreviate] undoa[ll] unl[et] unm[ap]
\ ve[rsion] vie[wsource] viu[sage] w[rite] wc[lose] win[open] winc[lose] wine[dit] wo[pen] wqa[ll] wq xa[ll] zo[om]
\ contained
syn match vimperatorCommand "!" contained
@@ -45,7 +43,7 @@ syn region vimperatorSet matchgroup=vimperatorCommand start="\%(^\s*:\=\)\@<=\<\
syn keyword vimperatorOption activate act activelinkfgcolor alfc activelinkbgcolor albc cdpath cd complete cpt defsearch ds editor
\ extendedhinttags eht eventignore ei guioptions go helpfile hf hintmatching hm hintstyle hs hinttags ht hinttimeout hto
\ history hi hlsearchstyle hlss laststatus ls linkbgcolor lbc linkfgcolor lfc newtab nextpattern pageinfo pa
\ history hi hlsearchstyle hlss laststatus ls linkbgcolor lbc linkfgcolor lfc messages msgs newtab nextpattern pageinfo pa
\ popups pps previewheight pvh previouspattern runtimepath rtp scroll scr shell sh shellcmdflag shcf showstatuslinks ssli
\ showtabline stal suggestengines titlestring urlseparator verbose vbs visualbellstyle t_vb wildignore wig wildmode wim
\ wildoptions wop wordseparators wsp
@@ -67,15 +65,15 @@ syn region vimperatorJavascript start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=" end
syn region vimperatorJavascript matchgroup=vimperatorJavascriptDelimiter
\ start="\%(^\s*\%(javascript\|js\)\s\+\)\@<=<<\s*\z(\h\w*\)"hs=s+2 end="^\z1$" contains=@javascriptTop fold
syn region vimperatorMap matchgroup=vimperatorCommand start="\%(^\s*:\=\)\@<=\<map\>" end="$" keepend oneline
\ contains=vimperatorNotation
syn match vimperatorNotation "<[0-9A-Za-z-]\+>"
syn match vimperatorLineComment +^\s*".*$+ contains=vimperatorTodo,@Spell
syn match vimperatorComment +".*$+ contains=vimperatorTodo,@Spell
syn keyword vimperatorTodo FIXME NOTE TODO XXX contained
syn region vimperatorString start="\z(["']\)" end="\z1" skip="\\\\\|\\\z1" oneline
syn match vimperatorLineComment +^\s*".*$+ contains=vimperatorTodo,@Spell
" NOTE: match vim.vim highlighting group names
hi def link vimperatorAutoCmd vimperatorCommand
hi def link vimperatorAutoEvent Type