Vimmatic - borwsing web pages with Vim-like key binds
Tags: vim, browser, productivity
Published: 2023-04-10 14:02:14

---
title: Vimmatic - borwsing web pages with Vim-like key binds
published: true
description: 
tags: vim, browser, productivity
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6fnh22rqzr50b90l7uha.jpg
---

Using a browser is a part of life these days.  Most Vim users have wanted to navigate a browser by Vim-like key binds.  Today, I will introduce a new browser extension, [Vimmatic](https://github.com/ueokande/vimmatic), which enables you to use your browser with Vim-like key binds.  

## Install

Vimmatic supports both Firefox and Google Chrome.  You can get Firefox add-on or Chrome Extensions from the following:

| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Chrome |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Get an add-on][get_firefox]                                                                                                                                                                                      | [Get an extension (experimental support)][get_chrome]                                                                                                                                                         |

Note that the Firefox requires an permission to run add-on on certain page.  To run the add-on on any pages, ensure that "Access your data for all websites" is enabled on permissions tab on add-on settings.

## Quick start

Vimmatic provides Vim-like key binds.  To scroll a page in the browser, press <kbd>k</kbd>, <kbd>j</kbd>, <kbd>h</kbd> and <kbd>l</kbd> keys.  You can scroll to the top or the bottom of a page by <kbd>g</kbd><kbd>g</kbd> and <kbd>G</kbd>.

To select a left and right of current tab, use <kbd>K</kbd> and <kbd>J</kbd> respectively.  To close current tab, use <kbd>d</kbd> and to restore closed tabs, use <kbd>u</kbd>.

See also [Keymaps on official document](https://ueokande.github.io/vimmatic/keymaps.html) for more detailed of keymaps.

## Follow mode

To open a link, press <kbd>f</kbd> to enter the **follow mode** to select a link.  Then you can select links by alphabetic keys.

![Screenshot of follow mode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k76i495wo7zvylf9afgi.png)

## Using command line

Vimmatic supports command line to run commands that control tabs and opens a tab.  To open command line, press <kbd>:</kbd>.

To open a tab with URL, use `open` command as the following:

```
:open https://github.com/ueokande/vimmatic
```

or search keywords with search engine (such as Google) like:

```
:open How to use Vim
```

You can see completed commands on [Console commands](https://ueokande.github.io/vimmatic/console_commands.html).

![Screenshot of command line](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i3hdb6ilphztgwvhuon0.png)

[get_firefox]: https://addons.mozilla.org/en-US/firefox/addon/vimmatic/
[get_chrome]: https://chrome.google.com/webstore/detail/vimmatic/pghmfgnakhjiphmlcnhfpgopkcjhiedc
[documentations]: https://ueokande.github.io/vimmatic/
[github repository]: https://github.com/ueokande/vimmatic