Use the hidden powers of the w3m textmode webbrowser
----------------------------------------------------

Last edited: $Date: 2011/01/29 23:00:00 $

> w3m is a very usefull textmode webbrowser

## Why a textmode webbrowser

Most people will use graphical browsers like Firefox,
Vimprobable or even Google Chrome. Textmode webbrowsers seem
to be old fashioned, however they do have many advantages.

The most important advantages of textmode webbrowsers are:

o  very fast
o  very high readability
o  focussed on what really matters (no distracting flashing
  images, no distracting google-ads)
o  clean display (no unnessairy elements on your screen, every
  pixel counts)
o  works in a text only environment too (so can be run from
  within Tmux, Gnu Screen or on a remote box from a ssh
  connection)

There are many good textmode webbrowsers. Elinks had been my
favorite browser for many years.

## Why w3m

The reason I switched from elinks to w3m is that w3m has
superior vi-like key-bindings. w3m offers tabbed browsing,
just like elinks.

## Unleash the hidden powers of w3m

Here follows some nice functions with their default key:

### Hyperlink operations

+------+-----------------+-----------------+
|Key   | Explanation     | Action          |
+------+-----------------+-----------------+
|U     | Go to URL       | Enter the URL   |
|      |                 | you whish to    |
|      |                 | visit.          |
+------+-----------------+-----------------+
|Esc-u | Go to relative  | Enter the       |
|      | URL             | relative URL    |
|      |                 | you whish to    |
|      |                 | visit.          |
+------+-----------------+-----------------+
|c     | Peek current    | See what the    |
|      | URL             | URL of the      |
|      |                 | current         |
|      |                 | document is.    |
+------+-----------------+-----------------+
|u     | Peek link URL   | Place cursor on |
|      |                 | a link and hit  |
|      |                 | "u" to see what |
|      |                 | URL it links    |
|      |                 | to.             |
+------+-----------------+-----------------+
|i     | Peek image URL  | Place cursor on |
|      |                 | a image and hit |
|      |                 | "i" to see what |
|      |                 | the URL of the  |
|      |                 | image is.       |
+------+-----------------+-----------------+
|L     | Show all links  | Hit "L" to get  |
|      | and images      | a list of all   |
|      |                 | links, anchors  |
|      |                 | and images of   |
|      |                 | the current     |
|      |                 | page.           |
+------+-----------------+-----------------+
|Esc-l | Popup linkslist | Hit "Esc-l"     |
|      |                 | (small L) to    |
|      |                 | get a popup     |
|      |                 | menu filled     |
|      |                 | with all the    |
|      |                 | links of the    |
|      |                 | current page.   |
+------+-----------------+-----------------+
|Esc-M | Open in         | Place cursor on |
|      | external        | a link and hit  |
|      | browser         | "Esc-M"         |
|      |                 | (shift-M) to    |
|      |                 | open the link   |
|      |                 | in an external  |
|      |                 | browser.        |
+------+-----------------+-----------------+

### Navigation operations

+-------+-----------------------+
|Key    | Action                |
+-------+-----------------------+
|B      | Back                  |
+-------+-----------------------+
|s      | Show history in popup |
|       | selection menu and go |
|       | to selected page      |
+-------+-----------------------+
|R      | Reload the current    |
|       | document              |
+-------+-----------------------+
|Esc-a  | Add current page to   |
|       | bookmarks             |
+-------+-----------------------+
|Esc-b  | Open a bookmarked     |
|       | page                  |
+-------+-----------------------+
|Cltr-h | View history          |
+-------+-----------------------+

### Tab operations

+-------+----------------------+
|Key    | Action               |
+-------+----------------------+
|T      | open new tab         |
+-------+----------------------+
|Ctrl-q | close current tab    |
+-------+----------------------+
|{      | move to previous tab |
+-------+----------------------+
|}      | move to next tab     |
+-------+----------------------+
|Esc-t  | open popup tab       |
|       | selection menu and   |
|       | move to seleced tab  |
+-------+----------------------+
|Ctrl-t | open current link in |
|       | a new tab            |
+-------+----------------------+

### Document operations

+------+-----------------+-----------------+
|Key   | Explanation     | Action          |
+------+-----------------+-----------------+
|v     | toggle view     | Toggle between  |
|      |                 | html-source and |
|      |                 | normal view     |
+------+-----------------+-----------------+
|S     | save the        |                 |
|      | rendered output |                 |
|      | of the current  |                 |
|      | document to a   |                 |
|      | file            |                 |
+------+-----------------+-----------------+
|Esc-s | save the        |                 |
|      | current         |                 |
|      | document to a   |                 |
|      | file            |                 |
+------+-----------------+-----------------+
|E     | edit current    | open the        |
|      | document        | current         |
|      |                 | document in an  |
|      |                 | editor if the   |
|      |                 | current         |
|      |                 | document is a   |
|      |                 | local document  |
+------+-----------------+-----------------+
|Esc-e | edit rendered   | open the        |
|      | document        | rendered output |
|      |                 | of the current  |
|      |                 | document in an  |
|      |                 | editor          |
+------+-----------------+-----------------+

### Image operations

+------+----------------+-----------------+
|Key   | Explanation    | Action          |
+------+----------------+-----------------+
|I     | view image     | Place cursor on |
|      |                | a image and hit |
|      |                | "I" to view the |
|      |                | image in an     |
|      |                | external image  |
|      |                | viewer.         |
+------+----------------+-----------------+
|i     | peek image URL | Place cursor on |
|      |                | a image and hit |
|      |                | "i" to see what |
|      |                | the URL of the  |
|      |                | image is.       |
+------+----------------+-----------------+
|Esc-I | save image     | Place cursor on |
|      |                | a image and hit |
|      |                | "Esc-I" to save |
|      |                | the image.      |
+------+----------------+-----------------+

### Pager operations

+-------+-----------------------+
|Key    | Action                |
+-------+-----------------------+
|space  | scroll one screen     |
|       | down                  |
+-------+-----------------------+
|+      | scroll one screen     |
|       | down                  |
+-------+-----------------------+
|Ctrl-v | scroll one screen     |
|       | down                  |
+-------+-----------------------+
|b      | scroll one screen up  |
+-------+-----------------------+
|-      | scroll one screen up  |
+-------+-----------------------+
|Esc-v  | scroll one screen up  |
+-------+-----------------------+
|k      | move cursor up one    |
|       | line                  |
+-------+-----------------------+
|j      | move cursor down one  |
|       | line                  |
+-------+-----------------------+
|K      | scroll down one line  |
+-------+-----------------------+
|J      | scroll up one line    |
+-------+-----------------------+
|<      | shift screen left     |
+-------+-----------------------+
|>      | shift screen right    |
+-------+-----------------------+
|Z      | move to center line   |
+-------+-----------------------+
|[      | go to first link      |
+-------+-----------------------+
|]      | go to last link       |
+-------+-----------------------+
|tab    | move to the next link |
+-------+-----------------------+
|Esc-m  | get a popup menu      |
|       | filled with all the   |
|       | links of the current  |
|       | page and move to the  |
|       | selected link.        |
+-------+-----------------------+
|Ctrl-l | redraw screen         |
+-------+-----------------------+

### Miscalanious operations

+-------+-----------------------+
|Key    | Action                |
+-------+-----------------------+
|Ctrl-k | view cookies          |
+-------+-----------------------+
|m      | toggle mouse          |
|       | operations (handy to  |
|       | select with the mouse |
|       | pointer without       |
|       | having to pres shift) |
+-------+-----------------------+

### w3m can do more

The above is not a complete list of w3m commands. See the
man-page or open help in w3m for more...