
Vimperator: a Vim-like Firefox - CapacitorSet
http://www.vimperator.org/vimperator
======
autocorr
I remember using the original keyboard productivity extension for Firefox,
"hit-a-hint"[1] back in Firefox 1 & 2\. Since discovering vimperator after, it
has been an essential extension on par with an ad blocker. However, I found it
consistently broke on new releases of Firefox and could take months to fix.
Pentadactyl wasn't any better in this regard. For example, the current
extension page says it only works up to Firefox 38! I eventually switched to
the less powerful extension VimFX[2] that can run on newer versions of
Firefox. It has more than 90% of what you use in vimperator: movement, hints,
and tab management. And really, things like the vimperator extension bar were
made for a time before the awesome bar, which can now do things like
completions, searching with keywords, and switching focus to other bookmarks
or tabs. It will be sad to see it go when Firefox finally deprecates XUL based
extensions, it's like a piece of history!

[1] [https://addons.mozilla.org/en-US/firefox/addon/hit-a-
hint/](https://addons.mozilla.org/en-US/firefox/addon/hit-a-hint/) [2]
[https://addons.mozilla.org/en-
US/firefox/addon/vimfx/?src=se...](https://addons.mozilla.org/en-
US/firefox/addon/vimfx/?src=search)

~~~
SilasX
Yes! I love being able to click on links from the keyboard! Sadly, a lot of
new interfaces make it hard for programs to recognize clickable links.

I went through a phase where I became obsessed with doing everything from the
keyboard rather than mouse[1] and that led me to pentadactyl (and then to
vim[2]), an add-on I fell in love with.

When the FF upgrades made it stop working I read the docs for how to compile
pentadactyl, and I fixed version compatibility. That became an ongoing thing.
(One time I also had to fix a bug in the build script.)

Sadly, about six months ago, Firefox banned unsigned addons, so I couldn't use
pentadactyl even if I allowed them in the config, leading me to write this
Hitler parody (and move to vimperator/vimfx):

[https://youtube.com/watch?v=taGARf8K5J8](https://youtube.com/watch?v=taGARf8K5J8)

[1] even registered tyrannyofthemouse.com

[2] I would have have heard about vim sooner but for not having much contact
with programmers

~~~
groovy2shoes
> Yes! I love being able to click on links from the keyboard!

You don't need an extension to do that in Firefox. Press the <'> key and start
typing, you'll get an incremental search like </> gives you, but limited to
hyperlink text. Once it's highlighted any bit of the link you want, press <CR>
to follow it. Works in Seamonkey, too.

~~~
SilasX
Interesting! Didn't know that, thanks! I still prefer the pop-up codes in the
extensions, though; they also allow the option of doing other operations on
the links, like copying, or opening in a new tab/window.

------
twistedanimator
I used to be a user of pentadactyl, but never liked how it changed the entire
look of the browser. Just last a couple of days ago, I found VimFx which is
exactly what I always wanted. It's also open source at
[https://github.com/akhodakivskiy/VimFx](https://github.com/akhodakivskiy/VimFx)

~~~
sirn
I'm the other way around: I tried switching from Vimperator to VimFx for a
week, but couldn't really make myself compatible with it. I'm too used to
browsing with toolbars=none[1] and browse almost exclusively via Vimperator
command line. I found VimFx still not enough to be used with everything
hidden.

Too bad that Vimperator will most likely stop working once Mozilla deprecate
XUL addons in Firefox 57[2].

[1]:
[https://files.grid.in.th/0EEhIG.png](https://files.grid.in.th/0EEhIG.png)

[2]: [https://blog.mozilla.org/addons/2016/11/23/add-ons-
in-2017/](https://blog.mozilla.org/addons/2016/11/23/add-ons-in-2017/)

~~~
chousuke
I switched to VimFx so I could get electrolysis working. I had to tweak
scrolling speed quite drastically and and there are some behavioural
differences which means I have to unlearn some muscle memory. However, with
the classic theme restorer addon the UI is compressed enough that it doesn't
bother me much and I can use the keyboard for almost everything.

I still wish I could have the command line back though. Annoyingly Firefox
actually includes some sort of command line thing when I press :, but it seems
to be only for web developers. I'd be happy if Mozilla provided a way to
extend that so that it could be used for actual browsing...

~~~
wsha
I switched to VimFx recently for the same reason. Actually, the ":" shortcut
for the GCLI command line is a VimFx shortcut, not a standard Firefox one. The
GCLI can be customized. See for example:

[https://developer.mozilla.org/en-
US/docs/Tools/GCLI/Writing_...](https://developer.mozilla.org/en-
US/docs/Tools/GCLI/Writing_GCLI_Commands)

I added a command to toggle a preference in about:config that I switch often.
It is kind of a pain to write and debug commands for the GCLI though (compared
to writing javascript mapping in Pentadactyl).

~~~
chousuke
Thanks for that. Unfortunately the documentation neglects to even link to API
documentation for the objects that get passed to the gcli functions or even
mention their types, so I guess I'm supposed to use some sort of console with
print debugging to figure out what I can do with them... too bad it seems
Firefox' built-in browser console just shows up blank.

------
chimeracoder
I love Vimperator - unfortunately, it's incompatible with e10s (multiprocess
Firefox) and it is also completely dependent on the deprecated XUL. Replacing
that would essentially be a ground-up rewrite[0].

It looks like Vimperator is likely not going to be updated to work with newer
versions of Firefox, which is a real shame, because it works far better than
any alternative I've found for either Firefox or Chrome. I even made my own
with the new Firefox API to see if I could replicate the experience, but it's
tough[1]. The WebExtension interface doesn't give the same level of control
that XUL did, and without which it's hard to give the same feel of Vimperator.

[0] [https://github.com/vimperator/vimperator-
labs/issues/211](https://github.com/vimperator/vimperator-labs/issues/211)

[1]
[https://github.com/ChimeraCoder/electrovim](https://github.com/ChimeraCoder/electrovim)

~~~
wsha
I have followed the situation fairly closely, and I agree with your
assessment. I haven't seen anything that makes me think either Pentadactyl or
Vimperator will survive the deprecation of XUL. The most promising vim-like
addon is VimFx (followed by the Chrome addons like Vimium and cVim which maybe
will work in Firefox one day as WebExtensions -- I try on Nightly every couple
months but they don't work so far). The reason I say this is that it has
active development and developers committed to the WebExtensions transition
(plus has less features so it is easier to port). You can follow the progress
here:

[https://bugzilla.mozilla.org/show_bug.cgi?id=1215061](https://bugzilla.mozilla.org/show_bug.cgi?id=1215061)
[https://github.com/lydell/webextension-
keyboard](https://github.com/lydell/webextension-keyboard)

------
Dangeranger
Chrome has Vimium for this, it's good to know there is an analogue for
Firefox. I love using Vim bindings while browsing.
[https://github.com/philc/vimium](https://github.com/philc/vimium)

~~~
mbel
Without Vimpertors's toolbar it's really hard to call Vimium an analogue. In
comparison to options that Vimperator offers Vimium is just a couple of
keymappings.

~~~
sirn
Closer to Vimperator is probably cVim[1], which also provides command line
mode.

[1]:
[https://chrome.google.com/webstore/detail/cvim/ihlenndgcmojh...](https://chrome.google.com/webstore/detail/cvim/ihlenndgcmojhcghmfjfneahoeklbjjh)

~~~
gnodar
I've used both, and cVim is superior to Vimium in every respect except for
one: the scrolling. In cVim when I hold down 'j' to scroll down, it does an
initial jerk, and then scrolls down. Doing the same in Vimium, it has a
smoother scroll and doesn't have the annoying initial jerk. That one thing has
kept me from switching from Vimium to cVim.

------
rvern
If you just want to use your web browser more efficiently, from the keyboard,
you don't need addons like Vimperator or VimFX. Firefox already has keyboard
shortcuts for everything. You can press Alt+H K to see the list of keyboard
shortcuts.

You can press Ctrl+L to select the location bar, Ctrl+K to select the search
bar. You can set browser.search.openintab if you want searches from the search
bar to open in a new tab and keyword.enabled to false if you don't want the
location bar to be used for searches.

You can press / and type text to select any text with the Quick Find bar,[1]
or press ' to select only links. You can use Ctrl+G or F3 in the Quick Find
bar to go to the next occurrence of your search and Shift+Ctrl+G or Shift+F3
to go to the previous occurrence.

You can use smart bookmarks to go quickly to any website or make searches on
any website by putting %s in a bookmark URL and adding a keyword which can be
used from the address bar.[2] You can even add keywords that will do POST
requests with the 'Add a Keyword for this Search...' context menu item for
search fields.[3]

There are also many keyboard shortcuts for editing and selecting text in text
fields, which have the benefit of being the same in most applications on all
platforms. There's a list on Wikipedia.[4]

There are keyboard shortcuts even for the more obscure features, like
Ctrl+Alt+R to enable reader mode and Ctrl+M to mute or unmute the current tab.

Your web browser _already_ has good keyboard shortcuts, you just need to learn
them.

[1]: [https://support.mozilla.org/en-US/kb/search-contents-
current...](https://support.mozilla.org/en-US/kb/search-contents-current-page-
text-or-links#w_quick-find)

[2]:
[http://kb.mozillazine.org/Bookmark_Keywords](http://kb.mozillazine.org/Bookmark_Keywords)

[3]: [https://support.mozilla.org/en-US/kb/how-search-from-
address...](https://support.mozilla.org/en-US/kb/how-search-from-address-bar)

[4]:
[https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts#Te...](https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts#Text_editing)

~~~
travv0
Serious question: Is there a way to scroll without using the arrow keys,
scroll by pages without PgUp/PgDn, etc? I didn't see anything in the links you
provided, and those buttons aren't very convenient on most keyboards I've
used.

~~~
rvern
Yep. You can use Space to scroll a page down and Shift+Space to scroll a page
up. For more precise scrolling, though, you will have to use the arrow keys or
the mouse.

~~~
travv0
Thanks, not sure how that slipped my mind.

------
baotiao
I have used vimperator for about 6 years, this is only reason that I still use
firefox. It's really amazing.

~~~
cszerzo
Although i'm not sure exactly how their features compare, I use vimium on
chrome which seems to be more or less the same:
[https://chrome.google.com/webstore/detail/vimium/dbepggeogba...](https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb?hl=en)

~~~
wingerlang
The key difference for me was the way they create the names of the links in
the popup. In Chrome you need to enter more or less random letters, while in
vimperator you can write the link name. The difference in usability was HUGE
for me and made me switch to FF for a brief moment from using Chrome since its
release day.

------
jonaf
This is interesting. I never thought of using vim commands to power the
browser, but I _do_ love text interfaces. (I type 150 wpm's and find keyboard
navigation markedly faster than the point-and-click interface -- especially
since keyboards are so much more precise.)

In 2008, back when I used Firefox, Mozilla tried an experimental interface
called Ubiquity[0]. It was awesome! I don't know if the plugin still works,
but I think text interfaces are really the way of the future for power users
(everything old is new again)? Has anyone found anything quite like Ubiquity
for Chrome or something like Vivaldi?

Other examples that come to mind: ChatOps[1] (seemingly popularized lately by
Slack), Alfred[2], and even OS X's own Spotlight[3].

Nowadays, though, I just rely on the default keybindings of Chrome for most
things. One of my favorites is Cmd+L, which highlights the contents of the
address bar.

[0]:
[https://wiki.mozilla.org/Labs/Ubiquity](https://wiki.mozilla.org/Labs/Ubiquity)

[1]: [http://blogs.atlassian.com/2016/01/what-is-chatops-
adoption-...](http://blogs.atlassian.com/2016/01/what-is-chatops-adoption-
guide/)

[2]: [https://www.alfredapp.com/](https://www.alfredapp.com/)

[3]: [https://support.apple.com/en-us/HT204014](https://support.apple.com/en-
us/HT204014)

~~~
rovr138
I have Vimium in Chrome, VimFX on Firefox and Vimmy in Safari.

Maybe something like Vimium would work for you?

------
green7ea
I've been using qutebrowser lately and I'm really liking it. It takes the
whole vim thing even further than simple extensions.

------
sudarshan_sar
This is a great plugin and I love being able to open URLs and search google,
amazon etc without actually visiting the landing page first - like hitting
'o-g <search>' or 'o-a <search>' for example. However with the support for
multiprocess not being there, I decided to move on to vimfx which is somewhat
more minimalistic and less easily configurable compared to vimperator, but in
my experience so far it is really smooth even though it lacks that particular
feature(among others) that I highlighted earlier in the comment(well not
entirely, you can still google search in a similar way). Overall though
vimperator was/is a great plugin, especially for people who are really used to
vim and hate switching to mouse for browsing the web.

~~~
autocorr
That's something I ran into as well, but actually has had a solution in
vanilla Firefox for a while. You can create keywords for searches by right
clicking a search box and selecting "add keyword for this search", and can
then be used in just the same as vimperator by typing that keyword into the
navigation/awesome bar (such as with VimFX). One advantage to this is that you
can create a bookmark folder of search keywords, and they'll sync across all
your devices thru Firefox sync. I find this especially handy on Firefox
mobile.

~~~
wsha
This is a nice feature. The downsides compared to Vimperator/Pentadactyl is
that you can tab-complete the search term and you can't get search suggestions
as you type (or at least I haven't gotten either of these things to work).

------
dvcrn
I wanted to try Vimperator multiple multiple times but every single time I
installed it, it didn't work for some reason. Either Firefox introduced some
breaking change that made Vimperator unusable or I received error messages
that through a session of Googling I couldn't fix.

------
akurilin
Any of you figured out how to get vimperator / pentadactyl to work with all of
the SPAs that have their own shortcuts? e.g. Asana or Reviewable or Gmail etc?
I've always had a pretty bad time with combining those.

Also, is there a solid Chrome version of any of the above?

~~~
CaptSpify
This is a big issue for me. Every stinking website thinks it's a good idea to
use crappy inconsistent keyboard shortcuts, but don't have a way to turn them
off.

------
Morantron
Also, if you want a similar behavior for copy pasting in terminal, check this
tmux plugin: [https://github.com/morantron/tmux-
fingers](https://github.com/morantron/tmux-fingers)

</shameless-plug>

------
spicytunacone
Been contently using Vimperator for at least a good year now (coming from
VimFX), but I'm trying to find something to jump ship to once support drops.
It's going to suck losing Rikaisama and uMatrix/uBO. Between the idiomatic
:o/:tabopen <se-keyword> searching, marks, recording and buffer management, a
simple Vi-like navigation extension can't compare. The fact that there's a
.vimperatorrc might be overkill for some, but, like any dotfile, a boon for
others. If Vimperator had splits I'd probably stay on some compatible fork.

------
anhari
I just discovered Vimperator a few weeks ago, and I am really enjoying it thus
far. I love the fact that it can be customized with a dot file, and I have
implemented some really useful leader keys that I have come to really rely on.

So far I've set up some resizing the window and accessing various dev tools:
[http://anhari.io/2017/01/10/vimming-around-in-
firefox.html](http://anhari.io/2017/01/10/vimming-around-in-firefox.html)

------
wodenokoto
The idea sounds intriguing, but I fail to see how `:back` is easier or faster
than `cmd+LeftArrow` or how `:open url.com` is faster than `cmd+l url.com` or
`cmd+t url.com`

What is the killer feature here?

~~~
johnvaluk
The 2 killer features for me are:

    
    
        1. Vi(m)-like keybindings
        2. Portable configuration (dotfile)
    

Like Vi(m), there are standard keybindings mapped to common commands, plus the
ability to create your own. My fingers never have to leave the keyboard to
navigate the Web, unless I have to interact with certain plugins.

Vimperator reads its configuration from a ~/.vimperatorrc file when it
launches. I keep this in version control like the rest of my dotfiles, so I
can deploy it to any machine for a reproducible environment. It supports
setting Firefox preferences (about:config settings), bookmarks, search
engines, etc. I have mine set to remove all the browser chrome, so Firefox has
looked almost exactly the same to me since 2009.

For example, I have a bookmark defined for Hacker News in ~/.vimperatorrc:

    
    
        bmark -keyword=h -title="Hacker News" https://news.ycombinator.com/
    

Now I can open Hacker News by typing 'oh' ('th' if I want it to open in a new
tab), then 'f<n>' to follow a link where <n> is the number highlighted over
the link (which decreases if you start typing some letters found in the link
text).

I can create searches, as well:

    
    
        bmark -keyword=g -title="Github" https://github.com/search?q=%s
    

Now I can type 'ogvimperatorrc' to find interesting configurations on GitHub.

The tab completion is great, so don't feel you have to limit keywords to a
single letter.

I'll be really sad if/when Vimperator becomes incompatible with Firefox. At
least there are other extensions or browsers that provide some of the same
functionality.

~~~
hackuser
Another way to perform similar operations: Firefox's bookmarks support very
similar keywords (or maybe the same ones). For example, to use a bookmark
keyword to HN:

    
    
      1) Create a bookmark to Hacker News
      2) In the bookmark's properties, in the keyword field,
         type: h
      3) In Firefox's main UI, type ALT+D to move focus to
         the URL field, then type: h
    

To search Github (I'm assuming the URL in the parent is correct):

    
    
      1) Create a new bookmark
      2) In the address field, type:
         https://github.com/search?q=%s
         (in case it's not obvious, you can use the
         %s variable in any URL)
      3) In the keyword field, type: g
    
      Then you want to search Github:
    
      4) In Firefox's main UI, type ALT+D to move focus to
         the URL field
      5) In the URL field, type: g foobar
         You'll soon see a Github search for foobar

------
li4ick
The one and only reason that stops me from using Vimperator is the smooth
scrolling feature, which is built into Vimium. Does anybody know how to get
the same behaviour into Vimperator?

------
Mauricio_
There's also Vimium for Chrome. Not sure how similar they are, but the only
feature that matters about Vimium is pressing the F key, which allows you to
open links without using the mouse. It's the greatest idea I've seen and it
should be a native feature of major browsers.

~~~
rvern
It is, people just don't know about it (it seems?). In Firefox, just press
'/'. You can also toggle 'Search for text when I start typing' in
about:preferences#advanced.

~~~
michaelmrose
Totally not even remotely the same thing. You need to type several times as
many characters in the best case and it will select the first instance of a
string even if it's nowhere near your cursor.

Additionaly you can't search for links that are graphics

~~~
rvern
Actually, it doesn't select the first instance in the document but rather the
first after your cursor. And you can use ' instead of / to select only links.

It allows you to open links without using the mouse, so saying it is not
exactly the same thing would be more accurate than saying it is "not even
remotely the same thing."

~~~
michaelmrose
It is sufficiently poor as not to be worth using as it would only work part of
the time and would be more effort than using the mouse.

------
jzelinskie
Who develops vimperator these days? Some of their primary maintainers moved
onto a separate project called Pentadactyl[0] a few years ago.

[0]: [http://5digits.org/pentadactyl/](http://5digits.org/pentadactyl/)

~~~
pmoriarty
Pentadactyl isn't the successor to Vimperator, it's just a similar extension
with a different feature set and some former Vimperator developers working on
it. From what I understand, Vimperator continued to be developed after
Pentadactyl was born. Long ago I compared the two and decided to use
Pentadactyl because it seemed to be more powerful, but I'm not sure how they
compare these days.

A much bigger problem is that Firefox is moving (has moved?) away from XUL and
XPCOM, a move which permanently breaks extensions like Pentadactyl (and
Vimperator too).

Already Pentadactyl is broken for me on the latest versions of Firefox and
Pale Moon (though I can't say for sure that it's because of XPCOM and XUL or
for some other reason).

In addition, the Pentadactyl nightly builds aren't signed, so if I want
Firefox to allow them to be installed I have to run the Firefox Developer
build and make a global preference change to allow _all_ unsigned extensions
to be installed.

This breaking of my favorite extensions on Firefox has made me move to Pale
Moon, where Pentadactyl was working until recently. Now that Pentadcatyl
doesn't even work on Pale Moon anymore, I'm not sure what to do.

~~~
oib
Signed builds are available here: [https://github.com/willsALMANJ/pentadactyl-
signed/releases](https://github.com/willsALMANJ/pentadactyl-signed/releases)

It works for me on Firefox 50.1.0

But the move away from XUL is indeed worrisome for plugins like these... I
kinda hope someone will just build it into the servo project and make that
into a usable minimal browser.

~~~
pmoriarty
Why aren't these on addons.mozzila.org or on the official Pentadactyl site?

I'm a little wary of installing addons from some random github repo.

~~~
wsha
I am willsALMANJ. The Pentadactyl devs never responded to repeated attempts to
engage them on the continued distribution of the addon. I could have posted it
to addons.mozilla.org, but it didn't feel right to package their work
unchanged when they had an official account and could have done it themselves
if they wanted to. I made the GitHub repo partly so that my own browsers would
get the compatibility updates and partly to help out others who wanted to keep
using Pentadactyl. I like keeping the working xpi available for those who want
it but I don't think it is worth promoting Pentadactyl any more because it is
only a matter of time before Firefox changes too much for it to keep working.

------
protomikron
Is it possible (in VimFX) to remap the (Shift) Escape? E.g. in my ~/.vimrc I
use

    
    
        imap jj <ESC>
    

How users can live with Vim's default behavior (Escape, Ctrl-C, Ctrl-[) is
mysterious to me (I do not like hitting Ctrl). :)

~~~
citisincyber
system bind caps -> ctrl. reduce stress on the pinky

~~~
protomikron
I may give that a try again, however 'jj' was more natural for me.

------
mbel
There is also a sibling project called Muttator, which brings vimperator to
Thunderbird. It allows you to get mutt-like ergonomics (including vim as text
editor) with support for HTML mails.

------
ams6110
Anyone know of something similar with emacs-style key bindings?

~~~
aban
With Vimperator you can remap the keys as you wish [0]; e.g.

    
    
      noremap <C-p> 2k
      noremap <C-n> 2j
    

To do the same in VimFx, see [1].

Also, Conkeror [2] to Emacs is as qutebrowser is to Vim.

[0]:
[https://gist.github.com/avendael/7028513](https://gist.github.com/avendael/7028513)

[1]:
[https://www.reddit.com/r/emacs/comments/561b03/emacs_keybind...](https://www.reddit.com/r/emacs/comments/561b03/emacs_keybindings_for_multiprocess_firefox/)

[2]: [http://conkeror.org/](http://conkeror.org/)

