| Age | Commit message (Collapse) | Author |
|
|
|
|
|
Keep the option list (in addition to the parsed command options) because
some commands may depend upon the command option order. One currect
example is #2318.
|
|
(Because we're scanning backwards throught the mappings, we shouldn't
overwrite an existing mapping.)
|
|
|
|
Previously, the dynamic HTML for the help dialog was generated on the
background page. The HTML itself was tangled in with program logic.
Here, we move all of the HTML to HTML5 templates; also, we build the
help-dialog contents in the help dialog itself, not on the background
page.
Note: #2368 is included here too.
(Background: I'm trying to clean up some of the command and help-dialog
logic in preparation for addressing the issue of how to document command
options, see #2319.)
|
|
There are two changes here:
1. Treat built-in key mappings and custom key mappings in the same way;
that is, we prepend the built-in mappings to the custom mappings and
then parse them all together. This results in a number of
simplifications due to previous duplication of logic and the elimination
of special cases.
2. Parse key mappings in reverse order, so we can just ignore key
mappings after first encountering a key sequence. So, `map`, `unmap`
and `unmapAll` are all treated in more or less the same way.
This is preparatory to reworking some aspects of the help page. In
particular, regardless of the order of maps, unmaps, etc., this approach
makes it easier to find the mapping in effect for a key sequence (and be
able to recreate the order of those mappings).
|
|
|
|
1. Explicitly remove comments.
2. A trailing backslash means the current line continues on the next line.
E.g.
a \
b \
c
is a single line `a b c`.
This helps alleviate the fact that configuration lines can be very long,
whereas the *Custom key mappings* input is quite narrow.
TODO: We should use the same line parser in the custom-search-engines
input.
|
|
|
|
Under *Custom key mappings* (on the options page), this implements:
translate x y
Whenever the users types `x` in normal mode or in visual mode, the `x`
is replaced by `y`.
For example:
map ç l
(which apparently would be helpful on Brazilian keyboards).
Issues:
- Do we want yet another hack like this? This would be documented only on
the wiki.
- If we allowed `translate <c-c> <c-[>` (and extended `isEscape()` to
use the translation), then we'd get the `exitMode` command for free
(#2253).
- Alternatively, instead of adding a new "command" called `translate`,
we could overload the existing `map` command. Since these are
single-key mappings, there's no ambiguity. (Although, I guess there's
a risk some user has junk in their key mappings and would be taken by
surprise).
Inspired by isssue posted by @vhoyer (#2305).
Fixes #2305.
|
|
We do not need the registryEntry's decription in the content scripts, so
remove it (saving a marginal amount of memory and time).
|
|
Fixes #2299.
Also, separate this regexp out into its constituent parts, because it is
becoming too different to read.
|
|
|
|
|
|
|
|
The new name better describes which the function does.
|
|
|
|
This reworks the parsing of key sequences like `<c-a-Z>x`:
Advantages over the status quo:
- Parses key sequences in one only place (previously two),
- Removes two hideous regular expression.
- Admits multi-modifier bindings (like `<c-a-Z>`).
- Adds more (and better) tests.
- (And it should be easier to maintain.)
Replaces #2210 (this also simplifies key parsing substantially).
|
|
|
|
|
|
Chrome stop using <backspace> to go back, but some still wants this
feature.
This should fix #2207 and #2214.
|
|
|
|
It reads weird on the helpd dialog if we don't put the full-page and
half-page commands in a similar order.
|
|
- Re-order commands such that we keep like with like, and have the more
important commands nearer the top.
- Re-word some command descriptions such that we use the same words for
the the same thing consistently.
- Move "View Source" to the "Miscellaneous" category.
- Make some commands "advanced commands".
|
|
Replaces #2037.
|
|
|
|
|
|
This command (LinkHints.activateModeToCopyLinkUrl) has been in the wrong
spot for quite some time. This just moves it to be with the other
link-hints commands.
|
|
We pass the count to *all* front-end commands. All of the commands
which don't use a count, just ignore it.
|
|
With this change, now *every* front-end command either accepts a count
argument, or or it doesn't accept a count at all.
|
|
"description" is the first element here, not all elements. So
"descriptor" is a better name.
|
|
|
|
|
|
Oversight from #2022.
|
|
This generalises the mechanism by which commands are always run in the
tab's main/top frame. Currently, that's just the Vomnibar.
This is a precursor to moving other UI components to the main/top frame.
It should be fairly trivial to move the help page to the main frame.
The HUD might be trickier.
Mention: @mrmr1993.
|
|
If we just use the name `background` instead of `isBackgroundCommand`,
then we can simplify the building of registry entries.
This is preparitory to adding a new registryEntry field: topFrame;
initially just for the Vomnibar, but thereafter for other UI components.
|
|
|
|
|
|
|
|
- simplify pass key condition
- don't keep key-parsing Regexp in memory
- we should reset the key state when the pass keys change
|
|
|
|
|
|
|
|
... We need it for the help page.
|
|
|
|
- There's no need to keep `@keyToCommandRegistry`; it's regenerated
whenever it's needed.
|
|
With:
map g something
map gg somethingElse
The mapping for "g" always takes priority, regardless of the order in
which they're encountered in `@keyToCommandRegistry`.
|
|
|
|
|