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

Merge branch 'master' into vimperator-2.1

Conflicts:
	vimperator/NEWS
This commit is contained in:
Kris Maglione
2009-01-21 03:40:04 -05:00
42 changed files with 340 additions and 177 deletions

View File

@@ -6,6 +6,9 @@ BASE = ../../../common
THIS_LOCALE = $(notdir $(shell pwd))
THIS_LANG = $(firstword $(subst -, ,$(THIS_LOCALE)))
ifneq ($(strip $(shell echo -n $(THIS_LANG) | wc -c)),2)
THIS_LANG = en
endif
ADC_SRC_FILES = $(wildcard *.txt)
ADC_FILES = $(ADC_SRC_FILES:%.txt=%.html)

View File

@@ -68,7 +68,7 @@ function Buffer() //{{{
ZoomManager.zoom = value / 100;
if ("FullZoom" in window)
FullZoom._applySettingToPref();
liberator.echo((fullZoom ? "Full" : "Text") + " zoom: " + value + "%");
liberator.echomsg((fullZoom ? "Full" : "Text") + " zoom: " + value + "%");
}
function bumpZoomLevel(steps, fullZoom)

View File

@@ -463,7 +463,15 @@ function Commands() //{{{
// using literal etc
parseArgs: function (str, options, argCount, allowUnknownOptions, literal, complete, extra)
{
function getNextArg(str) commands.parseArg(str);
function getNextArg(str)
{
let [count, arg, quote] = commands.parseArg(str);
if (quote == "\\" && !complete)
return [,,,"Trailing \\"];
if (quote && !complete)
return [,,,"E114: Missing quote: " + quote];
return [count, arg, quote];
}
if (!options)
options = [];
@@ -555,9 +563,9 @@ function Commands() //{{{
let sep = sub[optname.length];
if (sep == "=" || /\s/.test(sep) && opt[1] != this.OPTION_NOARG)
{
[count, arg, quote] = getNextArg(sub.substr(optname.length + 1));
if (quote == "\\" && !complete)
return liberator.echoerr("Trailing \\");
[count, arg, quote, error] = getNextArg(sub.substr(optname.length + 1));
if (error)
return liberator.echoerr(error);
// if we add the argument to an option after a space, it MUST not be empty
if (sep != "=" && !quote && arg.length == 0)
@@ -615,7 +623,7 @@ function Commands() //{{{
}
}
args[opt[0][0]] = arg; // always use the first name of the option
args[opt[0][0]] = opt[1] == this.OPTION_NOARG || arg; // always use the first name of the option
i += optname.length + count;
if (i == str.length)
break outer;
@@ -646,9 +654,9 @@ function Commands() //{{{
}
// if not an option, treat this token as an argument
var [count, arg, quote] = getNextArg(sub);
if (quote == "\\" && !complete)
return liberator.echoerr("Trailing \\");
let [count, arg, quote, error] = getNextArg(sub);
if (error)
return liberator.echoerr(error);
if (complete)
{

View File

@@ -579,7 +579,7 @@ CompletionContext.prototype = {
let context = new CompletionContext(this, name, offset);
this.contextList.push(context);
if (completer)
return completer.apply(self || this, [context].concat(Array.slice(arguments, 4)));
return completer.apply(self || this, [context].concat(Array.slice(arguments, arguments.callee.length)));
return context;
},
@@ -835,7 +835,7 @@ function Completion() //{{{
// Get an element from the stack. If @n is negative,
// count from the top of the stack, otherwise, the bottom.
// If @m is provided, return the @mth value of element @o
// of the stack entey at @n.
// of the stack entry at @n.
let get = function get(n, m, o)
{
let a = stack[n >= 0 ? n : stack.length + n];
@@ -1553,6 +1553,9 @@ function Completion() //{{{
}
},
// XXX
highlightGroup: function highlightGroup(context, args) commands.get("highlight").completer(context, args),
history: function _history(context, maxItems)
{
context.format = history.format;
@@ -1800,15 +1803,19 @@ function Completion() //{{{
context.advance(skip[0].length);
// Will, and should, throw an error if !(c in opts)
Array.forEach(complete || options["complete"],
function (c) context.fork(c, 0, completion, completion.urlCompleters[c].completer));
Array.forEach(complete || options["complete"], function (c) {
let completer = completion.urlCompleters[c];
context.fork.apply(context, [c, 0, completion, completer.completer].concat(completer.args));
});
},
urlCompleters: {},
addUrlCompleter: function addUrlCompleter(opt)
{
this.urlCompleters[opt] = UrlCompleter.apply(null, Array.slice(arguments));
let completer = UrlCompleter.apply(null, Array.slice(arguments));
completer.args = Array.slice(arguments, completer.length);
this.urlCompleters[opt] = completer;
},
urls: function (context, tags)

View File

@@ -46,6 +46,45 @@ function Editor() //{{{
// XXX: this strikes me as a rather odd ds; everyone's a critic --djk
var abbreviations = {}; // abbreviations["lhr"][0]["{i,c,!}","rhs"]
// (summarized from Vim's ":help abbreviations")
//
// There are three types of abbreviations:
//
// full-id: Consists entirely of keyword characters.
// ("foo", "g3", "-1")
//
// end-id: Ends in a keyword character, but all other
// are not keyword characters.
// ("#i", "..f", "$/7")
//
// non-id: Ends in a non-keyword character, but the
// others can be of any type other than space
// and tab.
// ("def#", "4/7$")
//
// Example strings that cannot be abbreviations:
// "a.b", "#def", "a b", "_$r"
//
// For now, a keyword character is anything except for \s, ", or '
// (i.e., whitespace and quotes). In Vim, a keyword character is
// specified by the 'iskeyword' setting and is a much less inclusive
// list.
//
// TODO: Make keyword definition closer to Vim's default keyword
// definition (which differs across platforms).
//
let nonkw = "\\s\"'";
let keyword = "[^" + nonkw + "]";
let nonkeyword = "[" + nonkw + "]";
let full_id = keyword + "+";
let end_id = nonkeyword + "+" + keyword;
let non_id = "\\S*" + nonkeyword;
// Used in addAbbrevation and expandAbbreviation
var abbrevmatch = full_id + "|" + end_id + "|" + non_id;
function getEditor()
{
return window.document.commandDispatcher.focusedElement;
@@ -164,7 +203,13 @@ function Editor() //{{{
"Abbreviate a key sequence" + modeDescription,
function (args)
{
let [lhs, rhs] = args;
let matches = args.string.match(RegExp("^\\s*($|" + abbrevmatch + ")(?:\\s*$|\\s+(.*))"));
if (! matches)
{
liberator.echoerr("E474: Invalid argument");
return false;
}
let [,lhs,rhs] = matches;
if (rhs)
editor.addAbbreviation(mode, lhs, rhs);
else
@@ -172,7 +217,7 @@ function Editor() //{{{
},
{
completer: function (context, args) completion.abbreviation(context, args, mode),
literal: 1,
literal: 0,
serial: function () [
{
command: this.name,
@@ -1010,7 +1055,7 @@ function Editor() //{{{
let text = textbox.value;
let currStart = textbox.selectionStart;
let currEnd = textbox.selectionEnd;
let foundWord = text.substring(0, currStart).replace(/^(.|\n)*?(\S+)$/m, "$2"); // get last word \b word boundary
let foundWord = text.substring(0, currStart).replace(RegExp("^(.|\\n)*?\\s*(" + abbrevmatch + ")$", "m"), "$2"); // get last word \b word boundary
if (!foundWord)
return true;

View File

@@ -887,7 +887,7 @@ function Events() //{{{
* to be taken literally, prepend it with a "\\".
* @param {boolean} noremap Allow recursive mappings.
* @param {boolean} silent Whether the command should be echoed to the
* command-line.
* command line.
* @returns {boolean}
*/
feedkeys: function (keys, noremap, silent)

View File

@@ -74,9 +74,9 @@ function Hints() //{{{
b: Mode("Follow hint in a background tab", function (elem) buffer.followLink(elem, liberator.NEW_BACKGROUND_TAB)),
w: Mode("Follow hint in a new window", function (elem) buffer.followLink(elem, liberator.NEW_WINDOW), extended),
F: Mode("Open multiple hints in tabs", hintAction_F),
O: Mode(":open URL based on hint location", function (elem, loc) commandline.open(":", "open " + loc, modes.EX)),
T: Mode(":tabopen URL based on hint location", function (elem, loc) commandline.open(":", "tabopen " + loc, modes.EX)),
W: Mode(":winopen URL based on hint location", function (elem, loc) commandline.open(":", "winopen " + loc, modes.EX)),
O: Mode("Generate an ':open URL' using hint", function (elem, loc) commandline.open(":", "open " + loc, modes.EX)),
T: Mode("Generate a ':tabopen URL' using hint",function (elem, loc) commandline.open(":", "tabopen " + loc, modes.EX)),
W: Mode("Generate a ':winopen URL' using hint",function (elem, loc) commandline.open(":", "winopen " + loc, modes.EX)),
v: Mode("View hint source", function (elem, loc) buffer.viewSource(loc, false), extended),
V: Mode("View hint source in external editor", function (elem, loc) buffer.viewSource(loc, true), extended),
y: Mode("Yank hint location", function (elem, loc) util.copyToClipboard(loc, true)),

View File

@@ -113,8 +113,13 @@ function IO() //{{{
try
{
path.appendRelativePath(self.expandPath(tail, true)); // FIXME: should only expand env vars and normalise path separators
if (path.exists() && path.normalize)
path.normalize();
// TODO: This code breaks the external editor at least in ubuntu
// because /usr/bin/gvim becomes /usr/bin/vim.gnome normalized and for
// some strange reason it will start without a gui then (which is not
// optimal if you don't start firefox from a terminal ;)
// Why do we need this code?
// if (path.exists() && path.normalize)
// path.normalize();
}
catch (e)
{

View File

@@ -656,7 +656,7 @@ const liberator = (function () //{{{
beep: function ()
{
// FIXME: popups clear the command-line
// FIXME: popups clear the command line
if (options["visualbell"])
{
// flash the visual bell
@@ -745,7 +745,7 @@ const liberator = (function () //{{{
// But it's _supposed_ to show the MOW on startup when there are
// messages, surely? As far as I'm concerned it essentially works
// exactly as it should with the DISALLOW_MULTILINE flag removed.
// Sending N messages to the command-line in a row and having them
// Sending N messages to the command line in a row and having them
// overwrite each other is completely broken. I also think many of
// those messages like "Added quick mark" are plain silly but if
// you don't like them you can set verbose=0, or use :silent when

View File

@@ -700,7 +700,11 @@ function Options() //{{{
" ";
liberator.echo(reference[1] + "\t\t" + prefix + value);
}
});
},
{
literal: 0
}
);
commands.add(["setl[ocal]"],
"Set local option",

View File

@@ -223,9 +223,14 @@ function Tabs() //{{{
"Go to the last tab",
function (count) { tabs.select("$"); });
mappings.add([modes.NORMAL], ["gt", "<C-n>", "<C-Tab>", "<C-PageDown>"],
mappings.add([modes.NORMAL], ["gt"],
"Go to the next tab",
function (count) { tabs.select(count > 0 ? count - 1: "+1", count > 0 ? false : true); },
function (count) { tabs.select(count > 0 ? count - 1 : "+1", count > 0 ? false : true); },
{ flags: Mappings.flags.COUNT });
mappings.add([modes.NORMAL], ["<C-n>", "<C-Tab>", "<C-PageDown>"],
"Go to the next tab",
function (count) { tabs.select("+" + (count < 1 ? 1 : count), true); },
{ flags: Mappings.flags.COUNT });
mappings.add([modes.NORMAL], ["gT", "<C-p>", "<C-S-Tab>", "<C-PageUp>"],
@@ -629,7 +634,7 @@ function Tabs() //{{{
"Undo closing of all closed tabs",
function (args)
{
for (let i in Itarator(tabs.closedTabs))
for (let i in Iterator(tabs.closedTabs))
window.undoCloseTab(0);
},

View File

@@ -605,7 +605,7 @@ function CommandLine() //{{{
}
/**
* Determines whether the command-line should be visible.
* Determines whether the command line should be visible.
*
* @return {boolean}
*/
@@ -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();
@@ -1037,7 +1044,7 @@ function CommandLine() //{{{
get message() messageBox.value,
/**
* Open the command-line. The main mode is set to
* Open the command line. The main mode is set to
* COMMAND_LINE, the extended mode to <b>extendedMode</b>.
* Further, callbacks defined for <b>extendedMode</b> are
* triggered as appropriate (see {@link Liberator#registerCallback}).
@@ -1072,8 +1079,8 @@ function CommandLine() //{{{
},
/**
* Closes the command-line. This is ordinarily triggered automatically
* by a mode change. Will not hide the command-line immediately if
* Closes the command line. This is ordinarily triggered automatically
* by a mode change. Will not hide the command line immediately if
* called directly after a successful command, otherwise it will.
*/
close: function close()
@@ -1110,7 +1117,7 @@ function CommandLine() //{{{
},
/**
* Hides the command-line, and shows any status messages that
* Hides the command line, and shows any status messages that
* are under it.
*/
hide: function hide()
@@ -1119,7 +1126,7 @@ function CommandLine() //{{{
},
/**
* Output the given string onto the command-line. With no flags, the
* Output the given string onto the command line. With no flags, the
* message will be shown in the status line if it's short enough to
* fit, and contains no new lines, and isn't XML. Otherwise, it will be
* shown in the MOW.

View File

@@ -177,7 +177,7 @@ const util = { //{{{
/**
* Copies a string to the system clipboard. If <b>verbose</b> is specified
* the copied string is also echoed to the command-line.
* the copied string is also echoed to the command line.
*
* @param {string} str
* @param {boolean} verbose

View File

@@ -99,4 +99,4 @@ on irc.freenode.net or check the Wiki for frequently asked questions. Make
sure, you have read the TODO file first, as I am aware of many things which
can be improved when I find time for it or get patches.
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -1,4 +1,8 @@
Contiuous donations:
* Daniel Bainton (web hosting)
2009:
* Peleg Michaeli ("Every hand revealed" from my amazon.de wishlist)
* InspireFocus
* Michael Fremont
* Kamil Dworakowski

View File

@@ -1,3 +1,7 @@
2009-XX-XX:
* version 2.1 (probably)
* add :silent
2008-XX-XX:
* version 2.0 (probably)
* IMPORTANT: For compatibility with vim, guioptions=b has been renamed
@@ -21,7 +25,7 @@
* IMPORTANT: 'verbose' is now by default at 1, set to 0 to not show any status messages
* IMPORTANT: $VIMPERATOR_HOME is no longer used.
* add :silent
* [count]<C-n> now goes to the [count]th next tab rather than the [count]th tab.
* add ~/.vimperator/info/{profile}/, similar to viminfo
* add $VIMPERATOR_RUNTIME, $VIMPERATOR_INIT and $MY_VIMPERATORRC
* :hardcopy now supports output redirection to a file on Unix and MacUnix

View File

@@ -26,7 +26,7 @@ BUGS:
else it chucks, I haven't investigated --djk
- messages is still broken in several ways - needs testing.
=> :ls | :echomsg "Foobar" doesn't add "Foobar" to the already open MOW.
=> it often overwrites the open command-line while editing etc.
=> it often overwrites the open command line while editing etc.
- <tags> and <keyword> autocmd 'keywords' are not available when adding a
bookmark - they're being set after the observer triggers the autocmd event.
- MOW is broken for multiple commands when open E.g. :ls | ls

View File

@@ -113,11 +113,11 @@ const config = { //{{{
// they are sorted by relevance, not alphabetically
helpFiles: [
"intro.html", "tutorial.html", "starting.html", "browsing.html",
"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",
"styling.html", "message.html", "developer.html", "various.html",
"index.html"
"buffer.html", "cmdline.html", "insert.html", "options.html",
"pattern.html", "tabs.html", "hints.html", "map.html", "eval.html",
"marks.html", "repeat.html", "autocommands.html", "print.html",
"gui.html", "styling.html", "message.html", "developer.html",
"various.html", "index.html"
],
scripts: [

View File

@@ -86,4 +86,4 @@ Set the filetype to mail when editing email at Gmail:
:autocmd LocationChange .* :set editor=gvim\ -f
:autocmd LocationChange mail\.google\.com :set editor="gvim -f -c 'set ft=mail'"
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -70,7 +70,7 @@ ________________________________________________________________________________
||:tabopen[!] [a][arg1][a], [a][arg2][a], ...|| +
||t||
________________________________________________________________________________
Just like [c]:open[c], but also uses a new tab for the first URL. When
Just like [c]:open[c] but also uses a new tab for the first URL. When
used with [!], the 'tabopen' value of the 'activate' option is negated.
________________________________________________________________________________
@@ -79,7 +79,7 @@ ________________________________________________________________________________
||T||
________________________________________________________________________________
Open one or more URLs in a new tab based on current location. Works like
[m]t[m], but preselects current URL in the [c]:tabopen[c] query.
[m]t[m] but preselects current URL in the [c]:tabopen[c] query.
________________________________________________________________________________
@@ -96,14 +96,14 @@ ________________________________________________________________________________
||O||
________________________________________________________________________________
Open one or more URLs in the current tab based on current location. Works
like [m]o[m], but preselects current URL in the [c]:open[c] query.
like [m]o[m] but preselects current URL in the [c]:open[c] query.
________________________________________________________________________________
|:winopen| |:wopen| |:winedit|
||:wino[pen][!] [a][arg1][a], [a][arg2][a], ...|| +
________________________________________________________________________________
Just like [c]:tabopen[c], but opens the resulting web page(s) in a new window.
Just like [c]:tabopen[c] but opens the resulting web page(s) in a new window.
________________________________________________________________________________
@@ -121,7 +121,7 @@ ________________________________________________________________________________
||P||
________________________________________________________________________________
Open (put) a URL based on the current clipboard contents in a new buffer. Works
like [m]p[m], but opens a new tab. +
like [m]p[m] but opens a new tab. +
Whether the new buffer is activated, depends on the 'activate' option.
________________________________________________________________________________
@@ -130,7 +130,7 @@ ________________________________________________________________________________
||gP||
________________________________________________________________________________
Open (put) a URL based on the current clipboard contents in a new buffer.
Works like [m]P[m], but inverts the 'activate' option.
Works like [m]P[m] but inverts the 'activate' option.
________________________________________________________________________________
@@ -346,4 +346,4 @@ ________________________________________________________________________________
Print the current directory name.
________________________________________________________________________________
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -326,9 +326,9 @@ ________________________________________________________________________________
section:Copying{nbsp}text[copying,yanking]
When running in X11 the text of the following commands is not only copied to
the clipboard, but also put into the X11 selection, which can be pasted with
the middle mouse button:
When running in X11, the text of the following commands is not only
copied to the clipboard but is also put into the X11 selection, which
can be pasted with the middle mouse button:
|y| +
||y||
@@ -358,4 +358,4 @@ the page's default style sheet is used.
All author styling can be removed by setting the 'usermode' option.
________________________________________________________________________________
// vim: set syntax=asciidoc fdm=marker:
// vim: set filetype=asciidoc fdm=marker:

View File

@@ -1,6 +1,6 @@
HEADER
|Command-line-mode| |Command-line| +
|Command-line-mode| |Command-line| |mode-cmdline| +
Command-line mode is used to enter Ex commands (":") and text search patterns
("/" and "?").
@@ -8,7 +8,7 @@ Command-line mode is used to enter Ex commands (":") and text search patterns
|:| +
||:||
________________________________________________________________________________
Start Command-line mode. In Command-line mode, you can perform extended
Start command-line mode. In command-line mode, you can perform extended
commands, which may require arguments.
________________________________________________________________________________
@@ -32,16 +32,16 @@ ________________________________________________________________________________
|c_<Up>| +
||<Up>||
________________________________________________________________________________
Recall the previous command-line from the history list which matches the
current command-line.
Recall the previous command line from the history list which matches the
current command line.
________________________________________________________________________________
|c_<Down>| +
||<Down>||
________________________________________________________________________________
Recall the next command-line from the history list which matches the current
command-line.
Recall the next command line from the history list which matches the current
command line.
________________________________________________________________________________
@@ -49,7 +49,7 @@ ________________________________________________________________________________
||<S-Up>|| +
||<PageUp>||
________________________________________________________________________________
Recall the previous command-line from the history list.
Recall the previous command line from the history list.
________________________________________________________________________________
@@ -57,7 +57,7 @@ ________________________________________________________________________________
||<S-Down>|| +
||<PageDown>||
________________________________________________________________________________
Recall the next command-line from the history list.
Recall the next command line from the history list.
________________________________________________________________________________
section:Command-line{nbsp}completion[cmdline-completion]
@@ -77,4 +77,4 @@ ________________________________________________________________________________
Complete the previous full match when 'wildmode' contains "full".
________________________________________________________________________________
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -85,4 +85,4 @@ Now you can copy the asciidoc text but always make sure it looks OK after
you compile the help file with "make doc", as the auto-generation might
not work correctly for all special cases.
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -17,7 +17,7 @@ ________________________________________________________________________________
|:echoe| |:echoerr|
||:echoe[rr] {expr}|| +
________________________________________________________________________________
Echo the expression as an error message. Just like [c]:ec[ho][c], but echoes
Echo the expression as an error message. Just like [c]:ec[ho][c] but echoes
the result highlighted as ErrorMsg and saves it to the message history.
________________________________________________________________________________
@@ -25,7 +25,7 @@ ________________________________________________________________________________
|:echom| |:echomsg|
||:echom[sg] {expr}|| +
________________________________________________________________________________
Echo the expression as an informational message. Just like [c]:ec[ho][c], but
Echo the expression as an informational message. Just like [c]:ec[ho][c] but
also saves the message in the message history.
________________________________________________________________________________
@@ -81,4 +81,4 @@ Deletes the variable {name}. Several variable names can be given. When used
with [!] no error message is output for non-existing variables.
________________________________________________________________________________
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -10,7 +10,7 @@ and the sidebar.
|:emenu| +
||:emenu {menu}||
________________________________________________________________________________
Execute {menu} from the command-line. This command provides command-line access
Execute {menu} from the command line. This command provides command-line access
to all menu items available from the main Firefox menubar. {menu} is a
hierarchical path to the menu item with each submenu separated by a period.
E.g. [c]:emenu File.Open File...[c]
@@ -87,4 +87,4 @@ standard Firefox View->Sidebar menu. Add-ons, Preferences and Downloads are
also available in the sidebar.
________________________________________________________________________________
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -51,9 +51,9 @@ this hint mode. Then press [a]24[a] to copy the hint location.
* |;b| [m]b[m] to open its location in a new background tab
* |;w| [m]w[m] to open its destination in a new window
* |;F| [m]F[m] to follow a sequence of [m]<CR>[m]-delimited hints in background tabs
* |;O| [m]O[m] to [c]:open[c] a URL based on hint location
* |;T| [m]T[m] to [c]:tabopen[c] a URL based on its location
* |;W| [m]W[m] to [c]:winopen[c] a URL based on its location
* |;O| [m]O[m] to generate an [c]:open[c] with hint's URL (like [m]O[m])
* |;T| [m]T[m] to generate a [c]:tabopen[c] with hint's URL (like [m]T[m])
* |;W| [m]W[m] to generate a [c]:winopen[c] with hint's URL
* |;v| [m]v[m] to view its destination source
* |;V| [m]V[m] to view its destination source in the external editor
* |;y| [m]y[m] to yank its destination location
@@ -63,4 +63,4 @@ Hintable elements for all extended hint modes can be set in the
'extendedhinttags' XPath string.
________________________________________________________________________________
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -4,6 +4,11 @@ HEADER
This file contains a list of all available commands.
section:Insert{nbsp}mode[insert-index]
||<C-i>|| Launch the external editor +
||<C-]>|| Expand an insert-mode abbreviation +
section:Normal{nbsp}mode[normal-index]
||<C-^>|| Select the alternate tab or the [count]th tab +
@@ -128,8 +133,8 @@ section:Command-line{nbsp}editing[ex-edit-index]
||<C-]>|| Expand a command-line abbreviation +
||<Up>|| Recall the previous command-line from the history list which matches the current command-line +
||<Down>|| Recall the next command-line from the history list which matches the current command-line +
||<Up>|| Recall the previous command line from the history list which matches the current command line +
||<Down>|| Recall the next command line from the history list which matches the current command line +
||<Tab>|| Complete the word in front of the cursor according to the behavior specified in 'wildmode' +
||<S-Tab>|| Complete the previous full match when 'wildmode' contains "full" +
@@ -172,7 +177,7 @@ section:Ex{nbsp}commands[ex-cmd-index,:index]
||:echo|| Echo the expression +
||:echoerr|| Echo the expression as an error message +
||:echomsg|| Echo the expression as an informational message +
||:emenu|| Execute the specified menu item from the command-line +
||:emenu|| Execute the specified menu item from the command line +
||:execute|| Execute the argument as an Ex command +
||:exusage|| List all Ex commands with a short description +
||:finish|| Stop sourcing a script file +
@@ -255,17 +260,14 @@ section:Ex{nbsp}commands[ex-cmd-index,:index]
section:Options[option-index]
||'activate'|| Define when tabs are automatically activated +
||'autodetector'|| set auto detect character encoding +
||'cdpath'|| List of directories searched when executing :cd +
||'complete'|| Items which are completed at the :[tab]open prompt +
||'defsearch'|| Set the default search engine +
||'disabledcssheets'|| Set disabled CSS style sheets +
||'editor'|| Set the external text editor +
||'errorbells'|| Ring the bell when an error message is displayed +
||'eventignore'|| List of autocommand event names which should be ignored +
||'exrc'|| Allow reading of an RC file in the current directory +
||'extendedhinttags'|| XPath string of hintable elements activated by [m];[m] +
||'fileencoding'|| set the charactor encoding for the current page +
||'focuscontent'|| Try to stay in normal mode after loading a web page +
||'followhints'|| Change the behaviour of [m]<Return>[m] in hint mode +
||'fullscreen'|| Show the current window fullscreen +
@@ -273,7 +275,7 @@ section:Options[option-index]
||'helpfile'|| Name of the main help file +
||'hintmatching'|| How links are matched +
||'hinttags'|| XPath string of hintable elements activated by [m]f[m] and [m]F[m] +
||'hinttimeout'|| Automatically follow non unique numerical hint +
||'hinttimeout'|| Timeout before automatically following a non-unique numerical hint +
||'history'|| Number of Ex commands and search patterns to store in the command-line history +
||'hlsearch'|| Highlight previous search pattern matches +
||'ignorecase'|| Ignore case in search patterns +
@@ -292,10 +294,10 @@ section:Options[option-index]
||'preload'|| Speed up first time history/bookmark completion +
||'previouspattern'|| Patterns to use when guessing the \'previous' page in a document sequence +
||'runtimepath'|| List of directories searched for runtime files +
||'scroll'|| Number of lines to scroll with and commands +
||'scroll'|| Number of lines to scroll with [m]<C-u>[m] and [m]<C-d>[m] commands +
||'shell'|| Shell to use for executing :! and :run commands +
||'shellcmdflag'|| Flag passed to shell when executing :! and :run commands +
||'showmode'|| Show the current mode in the command-line +
||'showmode'|| Show the current mode in the command line +
||'showstatuslinks'|| Show the destination of the link under the cursor in the status bar +
||'showtabline'|| Control when to show the tab bar of opened web pages +
||'smartcase'|| Override the 'ignorecase' option if the pattern contains uppercase characters +
@@ -311,4 +313,4 @@ section:Options[option-index]
||'wildoptions'|| Change how command-line completion is done +
||'wordseparators'|| How words are split for hintmatching +
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -0,0 +1,30 @@
HEADER
|Insert-mode| |Insert| |mode-insert| +
Insert mode is used to enter text in text boxes and text areas. When
'insertmode' is set, focusing on a text area immediately switches to
insert mode.
|i| +
||i||
________________________________________________________________________________
Starts insert mode in text areas when 'insertmode' is not set.
________________________________________________________________________________
section:Insert-mode{nbsp}special{nbsp}keys[ins-special-keys]
|i_<C-i>| +
||<C-i>||
________________________________________________________________________________
Launch the external editor. See the 'editor' option.
________________________________________________________________________________
|i_<C-]>| +
||<C-]>||
________________________________________________________________________________
Expand an insert-mode abbreviation.
________________________________________________________________________________
// vim: set filetype=asciidoc:

View File

@@ -20,7 +20,7 @@ are hidden. +
If you really need them, type: [c]:set guioptions+=mT[c] to get them back. +
If you don't like Vimperator at all, you can uninstall it by typing
[c]:addons[c] and remove/disable it. +
If you like it, but can't remember the shortcuts, press [m]F1[m] or
If you like it but can't remember the shortcuts, then press [m]F1[m] or
[c]:help[c] to get this help window back.
|author| |donation| +
@@ -51,6 +51,7 @@ section:Help{nbsp}topics[overview]
- help:Buffer{nbsp}commands[buffer.html]: Operations on the current document
like scrolling or copying text.
- help:Command-line[cmdline.html]: Command-line editing.
- help:Insert-mode[insert.html]: Insert-mode editing.
- help:Options[options.html]: A description of all options.
- help:Search{nbsp}commands[pattern.html]: Searching for text in the
current buffer.
@@ -111,4 +112,4 @@ on irc.freenode.net or check the Wiki for frequently asked questions. Make
sure, you have read the TODO file first, as I am aware of many things which
can be improved when I find time for it or get patches.
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -10,7 +10,7 @@ which are translated to a string of characters. Example:
:map <F2> :echo new Date().toDateString()<CR>
will echo the current date to the command-line when [m]<F2>[m] is pressed.
will echo the current date to the command line when [m]<F2>[m] is pressed.
There are separate key mapping tables for each of the Normal, Insert,
Command-line modes.
@@ -143,9 +143,9 @@ ________________________________________________________________________________
|:map-<silent>| +
________________________________________________________________________________
When the first argument to one of the mapping commands is <silent>, {rhs}
is not echoed to the command-line, nor, for that matter, is anything else
until the command has completed.
When the first argument to one of the mapping commands is <silent>,
{rhs} is not echoed to the command line, nor, for that matter, anything
else until the command has completed.
________________________________________________________________________________
@@ -172,14 +172,35 @@ ________________________________________________________________________________
section:Abbreviations[abbreviations]
Vimperator can automatically replace words identified as abbreviations,
which may be used to save typing or to correct commonly misspelled
words. An abbreviation can be one of three types that are defined by the
types of constituent characters. Whitespace and quotes are non-keyword
types, and all other characters are keyword types.
1. A "full-id" abbreviation consists entirely of characters that are not
keyword characters (e.g., "teh", "msoft").
2. An "end-id" abbreviation ends in keyword character but otherwise
contains all non-keyword characters (e.g., "'i").
3. A "non-id" abbreviation ends in a non-keyword character but otherwise
contains any non-whitespace character (e.g., "def'").
Strings that cannot be abbreviations include "a'b" and "a b".
An abbreviation is recognized when a space, quote character, or
[m]<C-]>[m] is typed after the abbreviation. There are no default
abbreviations, and abbreviations are never recursive.
|:ab| |:abbreviate|
||:ab[breviate] {lhs} {rhs}|| +
||:ab[breviate] {lhs}|| +
||:ab[breviate]||
________________________________________________________________________________
Abbreviate a key sequence. Abbreviate {lhs} to {rhs}. If only {lhs} is given,
list all abbreviations that start with {lhs}. List all abbreviations, if no
arguments are given.
list all abbreviations that start with {lhs}. If no arguments are given,
list all abbreviations.
________________________________________________________________________________
@@ -198,7 +219,7 @@ ________________________________________________________________________________
||:ia[bbrev] {lhs}|| +
||:ia[bbrev]||
________________________________________________________________________________
Abbreviate a key sequence for Insert mode. Same as [c]:ab[breviate][c], but
Abbreviate a key sequence for Insert mode. Same as [c]:ab[breviate][c] but
for Insert mode only.
________________________________________________________________________________
@@ -221,7 +242,7 @@ ________________________________________________________________________________
|:iuna| |:iunabbrev|
||:iuna[bbrev] {lhs}|| +
________________________________________________________________________________
Remove an abbreviation for Insert mode. Same as [c]:una[bbreviate][c], but for
Remove an abbreviation for Insert mode. Same as [c]:una[bbreviate][c] but for
Insert mode only.
________________________________________________________________________________
@@ -352,7 +373,7 @@ and <bang> will be available in the argument.
Replacement text
The replacement text {rep} is scanned for escape sequences and these are
replaced with values from the user entered command-line. The resulting string
replaced with values from the user-entered command line. The resulting string
is then executed as an Ex command.
The valid escape sequences are:
@@ -389,4 +410,4 @@ Add a :Google command to search via google:
// TODO: add decent examples
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -245,4 +245,4 @@ Show all location marks of current web page. If [a][arg][a] is specified then
limit the list to those marks mentioned.
________________________________________________________________________________
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -19,4 +19,4 @@ Redisplay the last command output. Only the most recent command's output is
available.
________________________________________________________________________________
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -132,8 +132,8 @@ ____
||:setl[ocal] {option}-={value}|| +
____
The same as [c]:set[c] command, but operates on local for current
tab options only. See [c]:set[c] for details.
The same as [c]:set[c] command, but it operates for current tab options
only. See [c]:set[c] for details.
____
|:setglobal| |:setg|
@@ -151,7 +151,7 @@ ____
||:setg[lobal] {option}-={value}|| +
____
The same as [c]:set[c] command, but operates on global options only.
The same as [c]:set[c] command, but it operates on global options only.
See [c]:set[c] for details.
____
@@ -198,6 +198,8 @@ The following preferences are set:
* browser.startup.page
* dom.popup_allowed_events
* accessibility.typeaheadfind.autostart
* accessibility.typeaheadfind
// TODO: others?
@@ -365,7 +367,7 @@ Change the hint matching algorithm during hint mode. Possible values:
`--------------------`-------------------------------------------------------------------------------------------------------------------------------
*contains* The typed characters are split on whitespace, and these character groups have to match anywhere inside the text of the link.
*wordstartswith* The typed characters are matched with the beginning of the first word (see 'wordseparators') in the link as long as possible. If no matches occur in the current word, then the matching is continued at the beginning of the next word. The words are worked through in the order they appear in the link. If the typed characters contain spaces, then the characters are split on whitespace. These character groups are then matched with the beginning of the words, beginning at the first one and continuing with the following words in the order they appear in the link.
*firstletters* Behaves like wordstartswith, but non matching words aren't overleaped.
*firstletters* Behaves like wordstartswith, but non-matching words aren't overleaped.
*custom* Delegate to a custom function: liberator.plugins.customHintMatcher(hintString)
-----------------------------------------------------------------------------------------------------------------------------------------------------
@@ -404,10 +406,9 @@ ____
|\'hto'| |\'hinttimeout'|
||'hinttimeout' 'hto'|| number (default: 0)
____
Automatically follow non unique numerical hint after 'hinttimeout'
milliseconds. +
Set to 0 (the default) to only follow numeric hints after pressing
[m]<Return>[m] or when the hint is unique.
Timeout before automatically following a non-unique numerical hint. Set to 0
(the default) to only follow numeric hints after pressing [m]<Return>[m] or
when the hint is unique.
____
@@ -585,7 +586,7 @@ ____
//____
//Default height for preview window
//
//Value must be between 1 and 50. If the value is too high, completions may cover the command-line. Close the preview window with :pclose.
//Value must be between 1 and 50. If the value is too high, completions may cover the command line. Close the preview window with :pclose.
//Note: Option currently disabled
//____
@@ -623,7 +624,7 @@ ____
|\'scr'| |\'scroll'|
||'scroll' 'scr'|| number (default: 0)
____
Number of lines to scroll with C-u and C-d commands.
Number of lines to scroll with [m]<C-u>[m] and [m]<C-d>[m] commands.
The number of lines scrolled defaults to half the window size.
When a [count] is specified to the [m]<C-u>[m] or [m]<C-d>[m] commands this is
used to set the value of 'scroll' and also used for the current command. The
@@ -650,7 +651,7 @@ ____
|\'nosmd'| |\'noshowmode'| |\'smd'| |\'showmode'|
||'showmode' 'smd'|| boolean (default: on)
____
Show the current mode in the command-line.
Show the current mode in the command line.
____
@@ -663,7 +664,7 @@ Also links which are focused by keyboard commands like [m]<Tab>[m] are shown. Po
.---`--------------------------------------
*0* Don't show link destination
*1* Show the link in the status line
*2* Show the link in the command-line
*2* Show the link in the command line
-------------------------------------------
____
@@ -826,4 +827,4 @@ A regexp which defines the word separators which are used for the
the text of a link.
____
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -67,4 +67,4 @@ Remove the search highlighting. The document highlighting is turned back on
when another search command is used or the 'hlsearch' option is set.
________________________________________________________________________________
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -30,4 +30,4 @@ and
respectively.
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -142,4 +142,4 @@ Use the special version with [!] if you just want to run any command multiple
times without showing profiling statistics.
________________________________________________________________________________
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -59,4 +59,4 @@ ________________________________________________________________________________
Force the browser to restart. Useful when installing extensions.
________________________________________________________________________________
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -27,24 +27,34 @@ valid, [!] will override the check, to speed Vimperator startup.
if provided will restrict the match to matching elements.
Valid groups are:
`------------------`-----------------------------------
`--------------------`-----------------------------------
*Bell* Vimperator's visual bell
*Boolean* A JavaScript Boolean object
*CmdLine* The command line
*CmdOutput*
*CompDesc* The description column of the completion list
*CompGroup*
*CompIcon* The favicon of a completion row
*CompItem* A completion row
*CompItem* A row of completion list
*CompItem[selected]* A selected row of completion list
*CompLess* The indicator shown when completions may be scrolled up
*CompLess::after* The character of indicator shown when completions may be scrolled up
*CompMore* The indicator shown when completions may be scrolled down
*CompMore::after* The character of indicator shown when completions may be scrolled down
*CompMsg*
*CompResult* The result column of the completion list
*CompTitle* Completion row titles
*ErrorMsg* Error messages
*Filter* The matching text in a completion list
*FrameIndicator* The indicator shown when a new frame is selected
*Function* A JavaScript Function object
*Hint* A hint indicator. See [c]:help hints[c].
*HintActive* The hint element which will be selected on <Enter>
*HintElem* The element which a hint refers to.
*HintImage* The indicator which floats above hinted images.
*Gradient*
*GradientLeft*
*GradientRight*
*Hint* A hint indicator. See [c]:help hints[c]
*HintActive* The hint element of link which will be followed by <Enter>
*HintElem* The hintable element
*HintImage* The indicator which floats above hinted images
*Indicator*
*InfoMsg* Information messages
*Keyword* A bookmark keyword for a URL
@@ -57,6 +67,7 @@ Valid groups are:
*Null* A JavaScript Null object
*Number* A JavaScript Number object
*Object* A JavaScript Object
*Preview*
*Question* A prompt for a decision
*Search* Highlighted search results in a web page
*StatusLine* The status bar
@@ -69,16 +80,15 @@ Valid groups are:
*TabNumber* The number of a browser tab, next to its icon
*TabText* The text of a browser tab
*Tag* A bookmark tag for a URL
*Title* The title of a listing, including [c]:bmarks[c], [c]:jumps[c]
*Title* The title of a listing, including [c]:pageinfo[c], [c]:jumps[c]
*URL* A URL
*WarningMsg* A warning message
-------------------------------------------------------
Every invocation completely replaces the styling of any previous invocation,
unless [-append] (short option: -a) is provided, in which case, {css} is
appended to its current value. If {css} is not provided and [!] is, any
styles matching {group} are listed. If neither {css} nor [!] is provided, the
style for {group} is reset to its default value.
appended to its current value. If {css} is not provided, any styles matching
{group} are listed.
________________________________________________________________________________
|:highlight-clear| +
@@ -118,4 +128,4 @@ style for [c]www.google.com,mozilla.org[c], will result in a style for
(short option: [c]-i[c])
________________________________________________________________________________
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -59,13 +59,19 @@ but in the other direction.
________________________________________________________________________________
|<C-PageDown>| |<C-Tab>| |<C-n>| |gt| +
|gt| +
||[count]gt||
________________________________________________________________________________
Go to the next tab. Cycles to the first tab, when the last is selected. +
If [count] is specified go to the [count]th tab.
________________________________________________________________________________
|<C-PageDown>| |<C-Tab>| |<C-n>| +
||[count]<C-n>||
________________________________________________________________________________
Go to the next tab. Cycles to the first tab, when the last is selected. +
If [count] is specified go to the [count]th next tab.
________________________________________________________________________________
|<C-PageUp>| |<C-S-Tab>| |<C-p>| |gT| +
||[count]gT||
@@ -209,4 +215,4 @@ Undo closing of all closed tabs. Firefox stores up to 10 closed tabs, even
after a browser restart.
________________________________________________________________________________
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -159,12 +159,12 @@ to return here, depending on which key you used to activate QuickHint mode.
section:Common{nbsp}issues[common-issues]
Say you get half-way done typing in a new URL, only to remember that you've
already got that page open in the previous tab. Your command-line might look
already got that page open in the previous tab. Your command line might look
something like this:
:open my.partial.url/fooba
You can exit the command-line and access the already loaded page with the
You can exit the command line and access the already loaded page with the
following:
<Esc>gT
@@ -210,7 +210,7 @@ make the best use of them.
It's exactly what it sounds like. This command will display a colorized,
scrollable and clickable list of the locations in Vimperator's history.
* [c]:emenu[c] --
Access the Firefox menus through the Vimperator command-line.
Access the Firefox menus through the Vimperator command line.
Feel free to explore at this point. If you use the [c]:tabopen[c] command,
@@ -250,4 +250,4 @@ are neither infinite nor omnipotent; please bear with us. If you can't wait for
us to get around to it, rest assured patches are welcome! See the
help:Developer[developer.html] page for more information.
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -19,7 +19,7 @@ ____
||:norm[al][!] {commands}|| +
________________________________________________________________________________
Execute Normal mode commands {commands}. This makes it possible to execute
Normal mode commands typed on the command-line. {commands} is executed like it
Normal mode commands typed on the command line. {commands} is executed like it
is typed. If the [!] is given, mappings will not be used. {commands} should be
a complete command. {commands} cannot start with a space. Put a 1 (one) before
it, 1 space is one space.
@@ -94,8 +94,8 @@ section:Uncategorized{nbsp}help[uncategorized]
|<C-[>| |<Esc>| +
||<Esc>||
________________________________________________________________________________
Focus content. Exits any command-line or hint mode and returns to browser
mode. Also focuses the web page, in case a form field has focus and eats
Focus content. Exits command-line or hint mode and returns to browser
mode. Also focuses the web page in case a form field has focus and eats
our key presses.
________________________________________________________________________________
@@ -115,4 +115,4 @@ ________________________________________________________________________________
//Close preview window on bottom of screen.
//________________________________________________________________________________
// vim: set syntax=asciidoc:
// vim: set filetype=asciidoc:

View File

@@ -19,8 +19,8 @@ var skipTests = [":bmarks", "gg"];
/////////////////////////////////////////////////////////////////////////////////////////
var doc; // document where we output status messages
var multilineOutput = document.getElementById("liberator-multiline-output")
var singlelineOutput = document.getElementById("liberator-commandline-command")
var multilineOutput = document.getElementById("liberator-multiline-output");
var singlelineOutput = document.getElementById("liberator-message");
/////////////////////////////////////////////////////////////////////////////////////////
// TESTS
@@ -37,9 +37,9 @@ let tests = [
{ cmds: [":!dir"],
verify: function () getMultilineOutput().length > 10 },
{ cmds: [":abbr VIMP vimperator labs", ":abbr"],
verify: function () getMultilineOutput().indexOf("vimperator labs") >= 0 },
verify: function () getOutput().indexOf("vimperator labs") >= 0 },
{ cmds: [":unabbr VIMP", ":abbr"],
verify: function () getMultilineOutput().indexOf("vimperator labs") == -1 },
verify: function () getOutput().indexOf("vimperator labs") == -1 },
{ cmds: [":bmarks"],
verify: function () getMultilineOutput().length > 100 },
{ cmds: [":echo \"test\""],