Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Pressing M in w3m launches the 1st external browser, 2M the second. While it is easy to bind the built-in command EXTERN to another key, is it possible to bind the second to another key?

share|improve this question

No, this isn't possible. There is only a single EXTERN command, and it invokes the first, second or third browser depending on the preceding numeric argument. W3m doesn't have a macro facility: you can't bind a key to a sequence of commands.

You could use an external macro facility: have a key send 2M when you're in w3m. That would require the macro facility to be aware of when you are in w3m. One way to do this is to always run w3m (and nothing else) in a dedicated screen or tmux configuration.

share|improve this answer
Thank you. Can the 'EXTERN' command take arguments? For example, 'EXTERN 2' or something similar? – Jing Dec 17 '12 at 23:35
@Jing Unfortunately, I don't think so. – Gilles Dec 18 '12 at 16:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.