w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

MANUAL.html (15799B)


      1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
      2 <html>
      3 <head><title>w3m manual</title>
      4 </head>
      5 <body>
      6 <h1>w3m MANUAL</h1>
      7 <div align=right>
      8 Akinori Ito<br>
      9 aito@fw.ipsj.or.jp 
     10 </div>
     11 <h2>Index</h2>
     12 <menu>
     13 <li><a href="#Introduction">Introduction</a>
     14 <li><a href="#Options">Options</a>
     15 <li><a href="#Color">Document color</a>
     16 <li><a href="#Key:orig">Key binding</a>
     17 <li><a href="#Key:lynx">Lynx-like key binding</a>
     18 <li><a href="#Mouse">Mouse operation</a>
     19 <li><a href="#Key:custom">Key customization</a>
     20 <li><a href="#LocalCGI">Local CGI</a>
     21 </menu>
     22 
     23 <hr>
     24 <a name="Introduction"></a>
     25 <h2>Introduction</h2>
     26 w3m is a pager/text-based WWW browser. You can browse local documents and/or 
     27 documents on the WWW using a terminal emulator.
     28 
     29 <hr>
     30 <a name="Options"></a>
     31 <h2>Options</h2>
     32 
     33 Command line usage is
     34 <p>
     35 <pre>
     36     w3m [options] [file|URL]
     37 </pre>
     38 <P>
     39 If you specify filenames/URLs on command line, these documents are displayed. 
     40 If you specify nothing, w3m reads a document from standard input and display it.
     41 If no filename and/or URLs are specified and standard input is tty, w3m terminates
     42 without displaying anything.
     43 
     44 <p>
     45 Options are as follows:
     46 <dl>
     47 <dt>+&lt;line number&gt;
     48 <dd>Move to the specified line.
     49 <dt>-t width
     50 <dd>Specify tab width. Default is 8.
     51 <dt>-r
     52 <dd>When displaying text/plain document, prohibit emphasis using backspace.
     53 If you don't specify this option, 
     54 ``A^H_'' is interpreted as underlined character and ``A^HA'' as a bold character.
     55 <dt>-l number
     56 <dd>Specify line number preserved internally when reading text/plain document
     57 fron standard input. Default is 10000.
     58 <dt>-s
     59 <dd>Display documents with Shift_JIS code.
     60 <dt>-e
     61 <dd>Display documents with EUC_JP code.
     62 <dt>-j
     63 <dd>Display documents with ISO-2022-JP code.
     64 <dt>-T type
     65 <dd>Specify document type. Without this option, document type
     66 is determined from extension of a file. If the determination
     67 fails, the document is regarded as text/plain.
     68 <p>
     69 Example:<br>
     70 Read HTML document from standard input and display it
     71 <pre>
     72    cat hoge.html | w3m -T text/html
     73 </pre>
     74 <p>
     75 Display HTML source
     76 <pre>
     77    w3m -T text/plain hoge.html
     78 </pre>
     79 <dt>-m
     80 <dd>Display document with Internet message mode.
     81 With this option, w3m determines document type from header information.
     82 It is useful when reading E-mail or NetNews messages.
     83 <dt>-v
     84 <dd>visual startup mode.
     85 <dt>-B
     86 <dd>Show the bookmark.
     87 <dt>-bookmark file
     88 <dd>Specify bookmark file.
     89 <dt>-M
     90 <dd>Monochrome display mode.
     91 <dt>-F
     92 <dd>Automatically render frame.
     93 <dt>-S
     94 <dd>Squeeze blank lines.
     95 <dt>-X
     96 <dd>Upon exit, do not display preserved screen.
     97 <dt>-W
     98 <dd>Toggle wrap search mode.
     99 <dt>-o option=value
    100 <dd>Specify option. The option names and values are
    101 same as that appears in ~/.w3m/config.
    102 <dt>-cookie
    103 <dd>Process cookies.
    104 <dt>-no-cookie
    105 <dd>Don't process cookies.
    106 <dt>-num
    107 <dd>Show linenumber.
    108 <dt>-dump
    109 <dd>Read document specified by URL and dump formatted text into standard
    110 output. The width of the document become 80. This width can be overridden
    111 with -cols option.
    112 <dt>-cols width
    113 <dd>Specify document width. Used with -dump option.
    114 <dt>-ppc count
    115 <dd> Specify the number of pixels per character (default 8.0). Larger
    116  values will make tables narrower.
    117 <dt>-dump_source
    118 <dd>Read document specified by URL and dump the source.
    119 <dt>-dump_head
    120 <dd>Read document specified by URL and dump headers.
    121 <dt>-dump_both
    122 <dd>Read document specified by URL and dump headers and the source.
    123 <dt>-dump_extra
    124 <dd>Read document specified by URL and dump extra informations, headers and the source.
    125 <dt>-post file
    126 <dd>use POST method with file content.
    127 <dt>-header string
    128 <dd>insert string as a header.
    129 <dt>-no-proxy
    130 <dd>Don't use proxy server.
    131 <dt>-no-graph
    132 <dd>Use ASCII character to draw frames.
    133 <dt>-no-mouse
    134 <dd>Don't activate mouse.
    135 <dt>-config file
    136 <dd>specify config file.
    137 </dl>
    138 
    139 <hr>
    140 <a name="Color"></a>
    141 <h2>Document color</h2>
    142 
    143 Links and images are displayed as follows.
    144 <div align="center">
    145 <table border="1">
    146 <tr><th>&nbsp;</th><th>Color mode</th><th>Monochrome mode</th></tr>
    147 <tr><td>links</td><td>blue</td><td>underline</td></tr>
    148 <tr><td>inline images</td><td>green</td><td>reverse</td></tr>
    149 <tr><td>form input</td><td>red</td><td>reverse</td></tr>
    150 </table>
    151 </div>
    152 These colors can be customized using option setting command "o".
    153 
    154 <hr>
    155 <a name="Key:orig"></a>
    156 <h2>Key binding</h2>
    157 
    158 After invocation, you can operate w3m by one-character commands from
    159 the keyboard.
    160 <P>
    161 Here's the original key-binding table. If you are using Lynx-like key
    162 bindings, see <a href="#Key:lynx">the Lynx-like key binding</a>.
    163 
    164 <H3>Page/Cursor motion</H3>
    165 <table>
    166 <TR><TD WIDTH=100>SPC,C-v<TD>Forward page
    167 <TR><TD>b,ESC v<TD>Backward page
    168 <TR><TD>l,C-f<TD>Cursor right
    169 <TR><TD>h,C-b<TD>Cursor left
    170 <TR><TD>j,C-n<TD>Cursor down
    171 <TR><TD>k,C-p<TD>Cursor up
    172 <TR><TD>J<TD>Roll up one line
    173 <TR><TD>K<TD>Roll down one line
    174 <TR><TD>^,C-a<TD>Go to the beginning of line
    175 <TR><TD>$,C-e<TD>Go to the end of line
    176 <TR><TD>w<TD>Go to next word
    177 <TR><TD>W<TD>Go to previous word
    178 <TR><TD>&gt;<TD>Shift screen right
    179 <TR><TD>&lt;<TD>Shift screen left
    180 <TR><TD>.<TD>Shift screen one column right
    181 <TR><TD>,<TD>Shift screen one column left
    182 <TR><TD>g,M-&lt;<TD>Go to the first line
    183 <TR><TD>G,M-&gt;<TD>Go to the last line
    184 <TR><TD>ESC g<TD>Go to specified line
    185 <TR><TD>Z<TD>Move to the center line
    186 <TR><TD>z<TD>Move to the center column
    187 <TR><TD>TAB<TD>Move to next hyperlink
    188 <TR><TD>C-u,ESC TAB<TD>Move to previous hyperlink
    189 <TR><TD>[<TD>Move to the first hyperlink
    190 <TR><TD>]<TD>Move to the last hyperlink
    191 </table>
    192 
    193 <H3>Hyperlink operation</H3>
    194 <table>
    195 <TR><TD WIDTH=100>RET<TD>Follow hyperlink
    196 <TR><TD>a, ESC RET<TD>Save link to file
    197 <TR><TD>u<TD>Peek link URL
    198 <TR><TD>i<TD>Peek image URL
    199 <TR><TD>I<TD>View inline image
    200 <TR><TD>ESC I<TD>Save inline image to file
    201 <TR><TD>:<TD>Mark URL-like strings as anchors
    202 <TR><TD>ESC :<TD>Mark Message-ID-like strings as news anchors
    203 <TR><TD>c<TD>Peek current URL
    204 <TR><TD>=<TD>Display information about current document
    205 <TR><TD>C-g<TD>Show current line number
    206 <TR><TD>C-h<TD>View history of URL
    207 <TR><TD>F<TD>Render frame
    208 <TR><TD>M<TD>Browse current document using external browser
    209 (use 2M and 3M to invoke second and third browser)
    210 <TR><TD>ESC M<TD>Browse link using external browser
    211 (use 2ESC M and 3ESC M to invoke second and third browser)
    212 </table>
    213 
    214 <H3>File/Stream operation</H3>
    215 <table>
    216 <TR><TD WIDTH=100>U<TD>Open URL
    217 <TR><TD>V<TD>View new file
    218 <TR><TD>@<TD>Execute shell command and load
    219 <TR><TD>#<TD>Execute shell command and browse
    220 </table>
    221 
    222 <H3>Buffer operation</H3>
    223 <table>
    224 <TR><TD WIDTH=100>B<TD>Back to the previous buffer
    225 <TR><TD>v<TD>View HTML source
    226 <TR><TD>s<TD>Select buffer
    227 <TR><TD>E<TD>Edit buffer source
    228 <TR><TD>C-l<TD>Redraw screen
    229 <TR><TD>R<TD>Reload buffer
    230 <TR><TD>S<TD>Save buffer
    231 <TR><TD>ESC s<TD>Save source
    232 <TR><TD>ESC e<TD>Edit buffer image
    233 </table>
    234 
    235 <H3>Buffer selection mode</H3>
    236 <table>
    237 <TR><TD WIDTH=100>k, C-p<TD>Select previous buffer
    238 <TR><TD>j, C-n<TD>Select next buffer
    239 <TR><TD>D<TD>Delect current buffer
    240 <TR><TD>RET<TD>Go to the selected buffer
    241 </table>
    242 
    243 <H3>Bookmark operation</H3>
    244 <table>
    245 <TR><TD WIDTH=100>ESC b<TD>Load bookmark
    246 <TR><TD>ESC a<TD>Add current to bookmark
    247 </table>
    248 
    249 <H3>Search</H3>
    250 <table>
    251 <TR><TD WIDTH=100>/,C-s<TD>Search forward
    252 <TR><TD>?,C-r<TD>Search backward
    253 <TR><TD>n<TD>Search next
    254 <TR><TD>N<TD>Search previous
    255 <TR><TD>C-w<TD>Toggle wrap search mode
    256 </table>
    257 
    258 <H3>Mark operation</H3>
    259 <table>
    260 <TR><TD WIDTH=100>C-SPC<TD>Set/unset mark
    261 <TR><TD>ESC p<TD>Go to previous mark
    262 <TR><TD>ESC n<TD>Go to next mark
    263 <TR><TD>"<TD>Mark by regular expression
    264 </table>
    265 
    266 <H3>Miscellany</H3>
    267 <table>
    268 <TR><TD WIDTH=100>!<TD>Execute shell command
    269 <TR><TD>H<TD>Help (load this file)
    270 <TR><TD>o<TD>Set option
    271 <TR><TD>C-k<TD>Show cookie jar
    272 <TR><TD>C-c<TD>Stop
    273 <TR><TD>C-z<TD>Suspend
    274 <TR><TD>q<TD>Quit (with confirmation, if you like)
    275 <TR><TD>Q<TD>Quit without confirmation
    276 </table>
    277 
    278 <H3>Line-edit mode</H3>
    279 <table>
    280 <TR><TD WIDTH=100>C-f<TD>Move cursor forward
    281 <TR><TD>C-b<TD>Move cursor backward
    282 <TR><TD>C-h<TD>Delete previous character
    283 <TR><TD>C-d<TD>Delete current character
    284 <TR><TD>C-k<TD>Kill everything after cursor
    285 <TR><TD>C-u<TD>Kill everything before cursor
    286 <TR><TD>C-a<TD>Move to the top of line
    287 <TR><TD>C-e<TD>Move to the bottom of line
    288 <TR><TD>C-p<TD>Fetch the previous string from the history list
    289 <TR><TD>C-n<TD>Fetch the next string from the history list
    290 <TR><TD>TAB,SPC<TD>Complete filename
    291 <TR><TD>RETURN<TD>Accept
    292 </table>
    293 
    294 <hr>
    295 <a name="Key:lynx"></a>
    296 <h2>Lynx-like key binding</h2>
    297 
    298 If you have chosen `Lynx-like key binding' at the compile time,
    299 you can use the following key binding.
    300 
    301 <H3>Page/Cursor motion</H3>
    302 <table>
    303 <TR><TD WIDTH=100>SPC,C-v,+<TD>Forward page
    304 <TR><TD>b,ESC v,-<TD>Previous page
    305 <TR><TD>l<TD>Cursor right
    306 <TR><TD>h<TD>Cursor left
    307 <TR><TD>j<TD>Cursor down
    308 <TR><TD>k<TD>Cursor up
    309 <TR><TD>J<TD>Roll up one line
    310 <TR><TD>K<TD>Roll down one line
    311 <TR><TD>^<TD>Go to the beginning of line
    312 <TR><TD>$<TD>Go to the end of line
    313 <TR><TD>&gt;<TD>Shift screen right
    314 <TR><TD>&lt;<TD>Shift screen left
    315 <TR><TD>C-a<TD>Go to the first line
    316 <TR><TD>C-e<TD>Go to the last line
    317 <TR><TD>G<TD>Go to the specified line
    318 <TR><TD>Z<TD>Move to the center line
    319 <TR><TD>z<TD>Move to the center column
    320 <TR><TD>TAB,C-n,Down arrow<TD>Move to next hyperlink
    321 <TR><TD>ESC TAB,C-p,Up arrow<TD>Move to previous link
    322 <TR><TD>C-g<TD>Show current page position
    323 </table>
    324 
    325 
    326 <H2>Hyperlink operation</H2>
    327 <table>
    328 <TR><TD WIDTH=100>RET, C-f, Right arrow<TD>Follow hyperlink
    329 <TR><TD>d, ESC RET<TD>Save link to file
    330 <TR><TD>u<TD>Peek link URL
    331 <TR><TD>i<TD>Peek image URL
    332 <TR><TD>I<TD>View inline image
    333 <TR><TD>ESC I<TD>Save inline image to file
    334 <TR><TD>:<TD>Mark URL-like strings as anchors
    335 <TR><TD>ESC :<TD>Mark Message-ID-like strings as news anchors
    336 <TR><TD>c<TD>Peek current URL
    337 <TR><TD>=<TD>Display information about current document
    338 <TR><TD>C-h<TD>View history of URL
    339 <TR><TD>F<TD>Render frame
    340 <TR><TD>M<TD>Browse current document using external browser
    341 (use 2M and 3M to invoke second and third browser)
    342 <TR><TD>ESC M<TD>Browse link using external browser
    343 (use 2ESC M and 3ESC M to invoke second and third browser)
    344 </table>
    345 
    346 <H2>File/Stream operation</H2>
    347 <table>
    348 <TR><TD WIDTH=100>g,U<TD>Open URL
    349 <TR><TD>V<TD>View new file
    350 <TR><TD>@<TD>Execute shell command and load
    351 <TR><TD>#<TD>Execute shell command and browse
    352 </table>
    353 
    354 <H2>Buffer operation</H2>
    355 <table>
    356 <TR><TD WIDTH=100>B, C-b, Left arrow<TD>Back to the previous buffer
    357 <TR><TD>\<TD>View HTML source
    358 <TR><TD>s, C-h<TD>Select buffer
    359 <TR><TD>E<TD>Edit buffer source
    360 <TR><TD>C-l, C-w<TD>Redraw screen
    361 <TR><TD>R, C-r<TD>Reload buffer
    362 <TR><TD>S, p<TD>Save buffer
    363 <TR><TD>ESC s<TD>Save source
    364 <TR><TD>ESC e<TD>Edit buffer image
    365 </table>
    366 
    367 <H2>Buffer selection mode</H2>
    368 <table>
    369 <TR><TD WIDTH=100>k, C-p<TD>Select previous buffer
    370 <TR><TD>j, C-n<TD>Select next buffer
    371 <TR><TD>D<TD>Delect current buffer
    372 <TR><TD>RET<TD>Go to the selected buffer
    373 </table>
    374 
    375 <H2>Bookmark operation</H2>
    376 <table>
    377 <TR><TD WIDTH=100>v, ESC b<TD>Load bookmark
    378 <TR><TD>a, ESC a<TD>Add current to bookmark
    379 </table>
    380 
    381 <H2>Search</H2>
    382 <table>
    383 <TR><TD WIDTH=100>/, C-s<TD>Search forward
    384 <TR><TD>n<TD>Search next
    385 <TR><TD>w<TD>Toggle wrap search mode
    386 </table>
    387 
    388 <H2>Mark operation</H2>
    389 <table>
    390 <TR><TD WIDTH=100>C-SPC<TD>Set/unset mark
    391 <TR><TD>P<TD>Go to previous mark
    392 <TR><TD>N<TD>Go to next mark
    393 <TR><TD>"<TD>Mark by regular expression
    394 </table>
    395 
    396 <H2>Miscellany</H2>
    397 <table>
    398 <TR><TD WIDTH=100>!<TD>Execute shell command
    399 <TR><TD>H, ?<TD>Help (load this file)
    400 <TR><TD>o<TD>Set option
    401 <TR><TD>C-k<TD>Show cookie jar
    402 <TR><TD>C-c<TD>Stop
    403 <TR><TD>C-z<TD>Suspend
    404 <TR><TD>q<TD>Quit (with confirmation, if you like)
    405 <TR><TD>Q<TD>Quit without confirmation
    406 </table>
    407 
    408 <H2>Line-edit mode</H2>
    409 <table>
    410 <TR><TD WIDTH=100>C-f<TD>Move cursor forward
    411 <TR><TD>C-b<TD>Move cursor backward
    412 <TR><TD>C-h<TD>Delete previous character
    413 <TR><TD>C-d<TD>Delete current character
    414 <TR><TD>C-k<TD>Kill everything after cursor
    415 <TR><TD>C-u<TD>Kill everything before cursor
    416 <TR><TD>C-a<TD>Move to the top of line
    417 <TR><TD>C-e<TD>Move to the bottom of line
    418 <TR><TD>C-p<TD>Fetch the previous string from the history list
    419 <TR><TD>C-n<TD>Fetch the next string from the history list
    420 <TR><TD>TAB,SPC<TD>Complete filename
    421 <TR><TD>RETURN<TD>Accept
    422 </table>
    423 
    424 <hr>
    425 <a name="Mouse"></a>
    426 <h2>Mouse operation</h2>
    427 If w3m is compiled with mouse option and you are using
    428 xterm/kterm/rxvt (in this case, you have to set the TERM
    429 environment variable to `xterm' or `kterm'.) or GPM 
    430 environment, you can use mouse
    431 for the navigation. 
    432 <p>
    433 <table border=0>
    434 <tr><td>left click
    435 <td>Move the cursor to the place pointed by the mouse cursor.
    436 If you click the cursor and it is on an anchor, follow the anchor.
    437 <tr><td>middle click
    438 <td>Back to the previous buffer.
    439 <tr><td>right click
    440 <td>Open pop-up menu. You can choose an item by clicking it.
    441 <tr><td>left drag
    442 <td>Scroll document. The default behavior is to grab the document
    443 and drag it. You can reverse the behavior (grab the window and drag it)
    444 with the option setting panel.
    445 </table>
    446 <p>
    447 
    448 
    449 <hr>
    450 <a name="Key:custom"></a>
    451 <h2>Key customization</h2>
    452 You can customize the key binding (except line-editing keymap)
    453 by describing ~/.w3m/keymap. For example,
    454 <pre>
    455 
    456    keymap C-o NEXT_PAGE
    457 
    458 </pre>
    459 binds `NEXT_PAGE' function (normally bound to SPC and C-v)
    460 to control-o. See <a href="README.func">README.func</a> for
    461 list of available functions. Original and Lynx-like keymap
    462 definitions are provided (<a href="keymap.default">keymap.default</a>
    463 and <a href="keymap.lynx">keymap.lynx</a>) as examples.
    464 
    465 <hr>
    466 <a name="LocalCGI"></a>
    467 <h2>Local CGI</h2>
    468 You can run CGI scripts using w3m, without any HTTP server.
    469 It means that w3m behaves like an HTTP server and activates CGI script,
    470 then w3m reads the output of the script and display it. The 
    471 <a href="file:///$LIB/w3mbookmark?mode=panel&bmark=~/.w3m/bookmark.html&url=MANUAL.html&title=w3m+manual">bookmark registration</a>
    472 and <a href="file:///$LIB/w3mhelperpanel?mode=panel">helper-app editor</a>
    473 are realized as local CGI scripts.
    474 Using local CGI, w3m can be used as a general purpose form interface.
    475 <P>
    476 For security reason, CGI scripts invoked by w3m must be in one of
    477 these directories.
    478 <ul>
    479 <li>The directory where w3m-related files are stored 
    480 (typically /usr/local/lib/w3m). This directory can be referred
    481 as $LIB.
    482 <li>/cgi-bin/ directory. You can map /cgi-bin/ to any directory you like
    483 with option setting panel (``Directory corresponds to /cgi-bin'' field).
    484 You can specify multiple paths separated by `:', like
    485 /usr/local/cgi-bin:/home/aito/cgi-bin. To use /cgi-bin/ directory,
    486 you must use file:/cgi-bin URL as follows:
    487 <pre>
    488  w3m -o cgi_bin=/path/to/cgi-bin file:/cgi-bin/script.cgi
    489 </pre>
    490 It is not recommended to include current directory to this path.
    491 </ul>
    492 <p>
    493 The CGI script can use special header `w3m-control:' to control w3m.
    494 This field can take any function (see <a href="README.func">README.func</a>),
    495 and the specified function is invoked after the document is displayed.
    496 For example, The CGI output
    497 <pre>
    498 
    499 Content-Type: text/plain
    500 W3m-control: BACK
    501 
    502 </pre>
    503 will display blank page and delete that buffer immediately.
    504 This is useful when you don't want to display any page after
    505 the script is invoked. The next example
    506 <pre>
    507 
    508 Content-Type: text/plain
    509 W3m-control: DELETE_PREVBUF
    510 
    511 contents.....
    512 </pre>
    513 will override the current buffer.
    514 <p>
    515 One w3m-control: header have to contain only one function, but you can
    516 include more than one w3m-control: lines in the HTTP header.
    517 In addition, you can specify an argument to GOTO function:
    518 <pre>
    519 
    520 Content-Type: text/plain
    521 W3m-control: GOTO http://www.yahoo.com/
    522 
    523 </pre>
    524 This example works exactly the same way to the Location header: 
    525 <pre>
    526 
    527 Content-Type: text/plain
    528 Location: http://www.yahoo.com/
    529 
    530 </pre>
    531 Note that this header has no effect when the CGI script is invoked
    532 through HTTP server.
    533 
    534 </body>
    535 </html>