Firefox without releasing the keyboard with Vimperator

Vimperator is a great Firefox plugin that allows you to use a large number of commands that you are used to when using the Vim text editor.

Installation

The installation involves going to the website of this extension, and we will also clone the GitHub repository for some extensions that we will use.

  1. Install the extension from your website.
  2. Clone the repository for the extensions:
    $ git clone github.com/vimpr/vimperator-plugins.git vimplug
  3. Create the .vimperatorrc file:
    $touch.vimperatorrc
  4. Create the .vimperator directory:
    $ mkdir .vimperator

Basic handling

Once the browser is restarted, we will know the basic handling.

To scroll, we will use the keyboard shortcuts that the Vim editor has by default, that is:

  1. Up down : k/j
  2. Open link in current tab: Press f and write the number that appears above the desired link
  3. Open link in another tab in the background: Press F and write the number that appears above the desired link
  4. Change tab: CTRL - n y CTRL - p
  5. Go back / go forward in the history of the current tab: CTRL - or y CTRL - i
  6. View current downloads: : downloads Note: Open in the same tab
  7. Add a bookmark: A Note: Later we will learn a more complete way to do this
  8. Find a bookmark: : bmark Note: Idem

Configuration

We will start by adding a few lines to our .vimperatorrc file which is like Vim's .vimrc.

nnoremap l nnoremap h

Now we enter the command mode of vimperator and load our new configuration:

: source! ~ / .vimperatorrc

Tiny explanation

What we did now is map the l key to be able to switch tabs on the right and the h key for the left.

Next, we'll edit the file so we can quickly access the sites we visit most often:

Add the following:

 
silent qmark R http://cloud.feedly.com silent qmark g https://gmail.com silent qmark w https://wolframalpha.com silent qmark r http://reddit.com silent qmark or https: // outlook .com

We load our file again with

: source! ~ / .vimperatorrc

We can practice the configuration by pressing the gnR keys and a new tab with the feed reader will open.

But now that we can access Feedly without touching the mouse , we find that we cannot use the keyboard shortcuts of that service.

To solve it we will use one of the scripts that we cloned previously, in particular, we will use libly.js. In order to use it, we follow these steps:

  1. $ cp vimplug / _libly.js .vimperator / plugin /
  2. Add the following line to the beginning of the .vimperatorrc file
    : source ~ / .vimperator / plugin_libly.js
  3. Add the following line to the .vimperatorrc file
    : lazy fmaps -u = 'cloud \ .feedly \ .com' m / r gm ga gg gl ovnp
  4. We reload the file with
    : source! ~ / .vimperatorrc

Now every time we access Feedly we can use the keyboard shortcuts that this page allows.

Finally, if the line goes down every time we press j, we can add the following to the .vimperatorrc file

nnoremap j 3j nnoremap k 3k

Now it will go down / up three lines.

To quickly move tabs we can add the following code to the .vimperatorrc file

nnoremap : tabmove! -1 nnoremap : tabmove! +1

Bookmarks / Favorites

Something that I use a lot when doing research or finding useful information is _favorites_.

But the fastest way to bookmark is CTRL – D or with Vimperator by pressing A , which only adds the link and its title so if a few weeks later we need that information we have to remember the title or the website.

To use the labels, press the 'a' key and at the end of the line that appears, write:

-tags Label1, Label2, etc

Now to perform the inverse function, we press

: bmarks -tags Label1

If we only use :bmarks, we can include part of the title or the link.

Miscellaneous

We can also access the context menu using the key combination ;c, we select the link (pressed with the keyboard
the digit that overlaps the link) and we press ENTER.

Tile Tabs

Although, being able to switch between flaps / tabs (from now on, out of laziness, tabs) with only h y l it is very comfortable, it can be improved a little
plus. This, using the extension Tile tabs that allows you to separate a tab into several, as if it were Vim's vsplit.

Once the extension is installed, its basic use is simple:

  1. Clone and separate the current tab press CTRL + Arrow
  2. Create new tab and separate press shift + Arrow
  3. Move to a sub-tab we press Shift+CTRL+ Arrow
  4. Unite in a single tab the current one and the one on the right, press F12, to separate them F12 again
This article has been written in our forum by daa1494I just bring it here with some small edits in the text.

Add as preferred source in Google