The default browser and editor in w3m where /usr/bin/firefox and
/usr/bin/vi respectively. I change that to termux-open-url and vi.
If you now press "M" on a link in w3m it will open it with Androids
default browser. If you press "E" while viewing a local file it will
open vi. Previously this has just printed error messages. Obviously
these settings can still be overwritten in the options of w3m to set it
to whatever you want.