Simon Lydell [Sun, 18 Oct 2015 18:57:09 +0000 (20:57 +0200)]
Add support for `<late>` shortcuts
By including the special key `<late>` in a shortcut it is run _after_ web page
event listeners, allowing them to override the VimFx shortcut. This is useful
when binding to `<tab>` and the arrow keys.
Simon Lydell [Sat, 17 Oct 2015 22:30:18 +0000 (00:30 +0200)]
Fix documentation link in the readme
It pointed to master, which will be correct when 0.6.0 is released. However,
there are already other links in the readme that point to develop, so we could
just as well make that link work for the time being as well.
Simon Lydell [Sat, 17 Oct 2015 18:52:53 +0000 (20:52 +0200)]
Fix shortcut triggering on slowly loadnig pages
Frame scripts cannot receive events until a DOMWindow has been created in it. If
you opened a link in a new tab, and the page loaded very slowly making it take a
long time before a DOMWindow is created, it meant that no VimFx shortcuts could
used during that time.
The solution is to handle shortcuts in the main process until a DOMWindow has
been created.
Simon Lydell [Sat, 17 Oct 2015 13:35:36 +0000 (15:35 +0200)]
Fix VimFx being broken in new windows
Apparently, the VimFx button only needs to be added once, not once per window.
Trying to add it more than once caused an exception that prevented the rest of
VimFx from being set up.
Simon Lydell [Sun, 11 Oct 2015 16:41:08 +0000 (18:41 +0200)]
Improve keyboard shortcut overriding behavior
- When the feature was initially implemented, it was modeled after putting a
series of `map` commands after each other in .vimrc, which is written in a
procedural programming language. Then it makes sense that latter `map` calls
override earlier ones. That's why VimFx used to let commands further down the
list in VimFx's settings page in the Add-ons Manager override earlier
commands. The more I used it, though, that didn't feel entirely natural. After
a while I realized that in such an interface it makes sense having _earlier_
commands win. With this commit, latter commands _don't_ override earlier ones
anymore, and are ignored, showing an error message.
- The above point also means that editing a shortcut can never result in error
messages appearing _above_ that command. If you add `g` to a shortcut near the
end of the list, there used to appear an error message for every shortcut
starting with `g` above it (which is quite a few), causing dis-orientation
when the focused text box was moved down because of all those error messages.
- With this commit, the order of the modes, categories and commands is taken
into account. That used to work only when the user hadn't customized the
orders or hadn't added new modes, categories and/or commands.
- A small fix for `<force>` is also included. If a shortcut contains invalid
usage of `<force>` it is now properly ignored (still showing an error
message).
Simon Lydell [Sun, 28 Jun 2015 09:57:56 +0000 (11:57 +0200)]
Lay the foundation for using multi-process Firefox
This also fixes leaking of variables in bootstrap.coffee (which masked a missing
`require` call in parse-prefs.coffee). Apparently all modules share its scope,
which I had never realized before.
This also exposes `Cc`, `Ci` and `Cu` globally to all modules (which actually
was done before, too, but only accidentally.)
Simon Lydell [Sat, 29 Aug 2015 21:08:58 +0000 (23:08 +0200)]
Stop URI encoding the API URL pref
The reason we used to was to make it easier to consume the public API (because
it is easier to read an ASCII string pref than a unicode one). However, some
systems return spaces already URI encoded, which breaks when encoding it once
more. In the end, this tiny simplification of the API consumption is not worth
it. Better to simply store the API URL as-is in a complex string pref.
Simon Lydell [Mon, 29 Jun 2015 19:25:39 +0000 (21:25 +0200)]
Remove ability to select text in help dialog
It was added so that you could select text and copy it, but unfortunately
nothing seems to happen when trying to copy. Then its better to leave the text
selection out entirely.
Simon Lydell [Sat, 27 Jun 2015 19:02:22 +0000 (21:02 +0200)]
Change `vf` into `zf` to free up `v`
Using the default shortcuts, `a`, `g`, `y` and `v` are prefix keys. `v` is only
used in `vf`. While `v` in `vf` kind of makes sense if you come from vim, it
would make a lot more sense to use `v` for a possible future text selection mode
(#480). `zf` is better since `z` is a prefix key in vim as well. The `z`
"namespace" will be useful as we add more commands.
Simon Lydell [Sat, 27 Jun 2015 14:02:09 +0000 (16:02 +0200)]
Make hint markers transparent when shift is held
The `vimfx-held-modifiers` attribute is now added on `#main-window`. It is a
space-separated list of the currently held modifiers (alt, ctrl, meta and
shift). This can be used in CSS: `#main-window[vimfx-held-modifiers~="alt"]`.
Simon Lydell [Fri, 26 Jun 2015 22:32:52 +0000 (00:32 +0200)]
Rename Insert mode into Ignore mode
... because that's what it is. Insert mode was a bit confusing since you could
easily think that Insert mode was entered any time you focused a text input. See
also #506.