w3m
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
w3m [2009/04/09 23:00] – k2patel | w3m [2020/08/10 02:35] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 13: | Line 13: | ||
If you specify filenames/ | If you specify filenames/ | ||
- | Options | + | ==== Options |
+ | Move to the specified line. | ||
+ | <code bash> | ||
+<line number> | +<line number> | ||
- | Move to the specified line. | + | </ |
+ | |||
+ | Specify tab width. Default is 8. | ||
+ | <code bash> | ||
-t width | -t width | ||
- | Specify tab width. Default | + | </ |
+ | |||
+ | When displaying text/plain document, prohibit emphasis using backspace. If you don't specify this option, ``A^H_'' | ||
+ | <code bash> | ||
-r | -r | ||
- | When displaying | + | </ |
+ | |||
+ | Specify line number preserved internally when reading | ||
+ | <code bash> | ||
-l number | -l number | ||
- | Specify line number preserved internally when reading text/plain document fron standard input. Default is 10000. | + | </code> |
+ | |||
+ | Display documents with Shift_JIS code. | ||
+ | <code bash> | ||
-s | -s | ||
- | | + | </ |
+ | |||
+ | Display documents with EUC_JP | ||
+ | <code bash> | ||
-e | -e | ||
- | | + | </ |
+ | |||
+ | Display documents with ISO-2022-JP | ||
+ | |||
+ | <code bash> | ||
-j | -j | ||
- | Display documents with ISO-2022-JP | + | </code> |
+ | |||
+ | Specify document type. Without this option, document type is determined from extension of a file.\\ | ||
+ | If the determination fails, the document is regarded as text/ | ||
+ | <code bash> | ||
-T type | -T type | ||
- | Specify document type. Without this option, document type is determined from extension of a file. If the determination fails, the document is regarded as text/plain. | ||
Example: | Example: | ||
Line 40: | Line 64: | ||
w3m -T text/plain hoge.html | w3m -T text/plain hoge.html | ||
+ | </ | ||
+ | Display document with Internet message mode. With this option, \\ | ||
+ | w3m determines document type from header information. It is useful when reading E-mail or NetNews messages. | ||
+ | <code bash> | ||
-m | -m | ||
- | Display document with Internet message | + | </ |
+ | visual startup | ||
+ | <code bash> | ||
-v | -v | ||
- | visual startup mode. | + | </ |
+ | Show the bookmark. | ||
+ | <code bash> | ||
-B | -B | ||
- | Show the bookmark. | + | </ |
+ | Specify | ||
+ | <code bash> | ||
-bookmark file | -bookmark file | ||
- | Specify bookmark file. | + | </ |
+ | Monochrome display mode. | ||
+ | <code bash> | ||
-M | -M | ||
- | Monochrome display mode. | + | </ |
+ | Automatically render frame. | ||
+ | <code bash> | ||
-F | -F | ||
- | Automatically render frame. | + | </ |
+ | |||
+ | Squeeze blank lines. | ||
+ | <code bash> | ||
-S | -S | ||
- | Squeeze blank lines. | + | </ |
+ | |||
+ | Upon exit, do not display preserved screen. | ||
+ | <code bash> | ||
-X | -X | ||
- | Upon exit, do not display preserved screen. | + | </ |
+ | |||
+ | Toggle wrap search mode. | ||
+ | <code bash> | ||
-W | -W | ||
- | Toggle wrap search mode. | + | </ |
+ | |||
+ | Specify option. The option names and values are same as that appears in ~/ | ||
+ | <code bash> | ||
-o option=value | -o option=value | ||
- | Specify option. The option names and values are same as that appears in ~/.w3m/config. | + | </code> |
+ | |||
+ | Process cookies. | ||
+ | <code bash> | ||
-cookie | -cookie | ||
- | Process | + | </ |
+ | |||
+ | Don't process | ||
+ | <code bash> | ||
-no-cookie | -no-cookie | ||
- | Don't process cookies. | + | </ |
+ | |||
+ | Set username and password for (basic) proxy authentication. | ||
+ | <code bash> | ||
-pauth username: | -pauth username: | ||
- | Set username and password for (basic) proxy authentication. | + | </ |
+ | |||
+ | Show linenumber. | ||
+ | <code bash> | ||
-num | -num | ||
- | Show linenumber. | + | </ |
+ | |||
+ | Read document specified by URL and dump formatted text into standard output.\\ | ||
+ | The width of the document become 80. This width can be overridden with -cols option. | ||
+ | <code bash> | ||
-dump | -dump | ||
- | Read document | + | </ |
+ | |||
+ | Specify | ||
+ | <code bash> | ||
-cols width | -cols width | ||
- | | + | </ |
+ | |||
+ | Specify | ||
+ | <code bash> | ||
-ppc count | -ppc count | ||
- | Specify | + | </ |
+ | |||
+ | Read document specified by URL and dump the source. | ||
+ | <code bash> | ||
-dump_source | -dump_source | ||
- | | + | </ |
+ | |||
+ | Read document specified by URL and dump headers. | ||
+ | <code bash> | ||
-dump_head | -dump_head | ||
- | | + | </ |
+ | |||
+ | Read document specified by URL and dump headers | ||
+ | <code bash> | ||
-dump_both | -dump_both | ||
- | | + | </ |
+ | |||
+ | Read document specified by URL and dump extra informations, | ||
+ | <code bash> | ||
-dump_extra | -dump_extra | ||
- | Read document specified by URL and dump extra informations, | + | </ |
+ | |||
+ | use POST method with file content. | ||
+ | <code bash> | ||
-post file | -post file | ||
- | use POST method with file content. | + | </ |
+ | |||
+ | insert string as a header. | ||
+ | <code bash> | ||
-header string | -header string | ||
- | insert string as a header. | + | </ |
+ | |||
+ | Don't use proxy server. | ||
+ | <code bash> | ||
-no-proxy | -no-proxy | ||
- | | + | </ |
+ | |||
+ | Don't use graphic character to draw frames. | ||
+ | <code bash> | ||
-no-graph | -no-graph | ||
- | | + | </ |
+ | |||
+ | Don' | ||
+ | <code bash> | ||
-no-mouse | -no-mouse | ||
- | Don't activate mouse. | + | </ |
+ | |||
+ | specify config file. | ||
+ | <code bash> | ||
-config file | -config file | ||
- | specify config file. | + | </ |
+ | |||
+ | |||
+ | ==== Document color ==== | ||
- | Document color | ||
Links and images are displayed as follows. | Links and images are displayed as follows. | ||
+ | <code text> | ||
| | ||
links blue underline | links blue underline | ||
inline images green reverse | inline images green reverse | ||
form input red reverse | form input red reverse | ||
+ | </ | ||
These colors can be customized using option setting command " | These colors can be customized using option setting command " | ||
- | Key binding | + | |
+ | ==== Key binding | ||
After invocation, you can operate w3m by one-character commands from the keyboard. | After invocation, you can operate w3m by one-character commands from the keyboard. | ||
Here's the original key-binding table. If you are using Lynx-like key bindings, see the Lynx-like key binding. | Here's the original key-binding table. If you are using Lynx-like key bindings, see the Lynx-like key binding. | ||
- | Page/Cursor motion | + | === original key-binding table === |
+ | |||
+ | <code text | Page/Cursor motion> | ||
SPC, | SPC, | ||
b,ESC v Backward page | b,ESC v Backward page | ||
Line 133: | Line 244: | ||
[ Move to the first hyperlink | [ Move to the first hyperlink | ||
] Move to the last hyperlink | ] Move to the last hyperlink | ||
- | Hyperlink operation | + | </ |
+ | <code text | Hyperlink operation> | ||
RET Follow hyperlink | RET Follow hyperlink | ||
a, ESC RET Save link to file | a, ESC RET Save link to file | ||
Line 149: | Line 262: | ||
M Browse current document using external browser (use 2M and 3M to invoke second and third browser) | M Browse current document using external browser (use 2M and 3M to invoke second and third browser) | ||
ESC M Browse link using external browser (use 2ESC M and 3ESC M to invoke second and third browser) | ESC M Browse link using external browser (use 2ESC M and 3ESC M to invoke second and third browser) | ||
- | File/Stream operation | + | </ |
+ | <code text | File/Stream operation> | ||
U Open URL | U Open URL | ||
V View new file | V View new file | ||
@ Execute shell command and load | @ Execute shell command and load | ||
# Execute shell command and browse | # Execute shell command and browse | ||
- | Buffer operation | + | </ |
+ | <code text | Buffer operation> | ||
B Back to the previous buffer | B Back to the previous buffer | ||
v View HTML source | v View HTML source | ||
Line 164: | Line 281: | ||
ESC s Save source | ESC s Save source | ||
ESC e Edit buffer image | ESC e Edit buffer image | ||
- | Buffer selection mode | + | </ |
+ | <code text | Buffer selection mode> | ||
k, C-p Select previous buffer | k, C-p Select previous buffer | ||
j, C-n Select next buffer | j, C-n Select next buffer | ||
D Delect current buffer | D Delect current buffer | ||
RET Go to the selected buffer | RET Go to the selected buffer | ||
- | Bookmark operation | + | </ |
+ | <code text | Bookmark operation> | ||
ESC b Load bookmark | ESC b Load bookmark | ||
ESC a Add current to bookmark | ESC a Add current to bookmark | ||
- | Search | + | </ |
+ | <code text | Search> | ||
/, | /, | ||
?, | ?, | ||
Line 178: | Line 301: | ||
N Search previous | N Search previous | ||
C-w Toggle wrap search mode | C-w Toggle wrap search mode | ||
- | Mark operation | + | </ |
+ | <code text | Mark operation> | ||
C-SPC Set/ | C-SPC Set/ | ||
ESC p Go to previous mark | ESC p Go to previous mark | ||
ESC n Go to next mark | ESC n Go to next mark | ||
" Mark by regular expression | " Mark by regular expression | ||
- | Miscellany | + | </ |
+ | <code text | Miscellany> | ||
! Execute shell command | ! Execute shell command | ||
H Help (load this file) | H Help (load this file) | ||
Line 192: | Line 319: | ||
q Quit (with confirmation, | q Quit (with confirmation, | ||
Q Quit without confirmation | Q Quit without confirmation | ||
- | Line-edit mode | + | </ |
+ | <code text | Line-edit mode> | ||
C-f Move cursor forward | C-f Move cursor forward | ||
C-b Move cursor backward | C-b Move cursor backward | ||
Line 205: | Line 334: | ||
TAB, | TAB, | ||
RETURN Accept | RETURN Accept | ||
- | Lynx-like key binding | + | </ |
- | If you have chosen `Lynx-like key binding' | + | |
- | Page/Cursor motion | + | === Lynx-like key binding |
+ | |||
+ | <code text | Page/Cursor motion> | ||
SPC, | SPC, | ||
b,ESC v, | b,ESC v, | ||
Line 228: | Line 359: | ||
ESC TAB,C-p,Up arrow Move to previous link | ESC TAB,C-p,Up arrow Move to previous link | ||
C-g Show current page position | C-g Show current page position | ||
- | Hyperlink operation | + | </ |
+ | <code text | Hyperlink operation> | ||
RET, C-f, Right arrow Follow hyperlink | RET, C-f, Right arrow Follow hyperlink | ||
d, ESC RET Save link to file | d, ESC RET Save link to file | ||
Line 243: | Line 375: | ||
M Browse current document using external browser (use 2M and 3M to invoke second and third browser) | M Browse current document using external browser (use 2M and 3M to invoke second and third browser) | ||
ESC M Browse link using external browser (use 2ESC M and 3ESC M to invoke second and third browser) | ESC M Browse link using external browser (use 2ESC M and 3ESC M to invoke second and third browser) | ||
- | File/Stream operation | + | </ |
+ | <code text | File/Stream operation> | ||
g,U Open URL | g,U Open URL | ||
V View new file | V View new file | ||
@ Execute shell command and load | @ Execute shell command and load | ||
# Execute shell command and browse | # Execute shell command and browse | ||
- | Buffer operation | + | </ |
+ | <code text | Buffer operation> | ||
B, C-b, Left arrow Back to the previous buffer | B, C-b, Left arrow Back to the previous buffer | ||
\ View HTML source | \ View HTML source | ||
Line 258: | Line 392: | ||
ESC s Save source | ESC s Save source | ||
ESC e Edit buffer image | ESC e Edit buffer image | ||
- | Buffer selection mode | + | </ |
+ | <code text | Buffer selection mode> | ||
k, C-p Select previous buffer | k, C-p Select previous buffer | ||
j, C-n Select next buffer | j, C-n Select next buffer | ||
D Delect current buffer | D Delect current buffer | ||
RET Go to the selected buffer | RET Go to the selected buffer | ||
- | Bookmark operation | + | </ |
+ | <code text | Bookmark operation> | ||
v, ESC b Load bookmark | v, ESC b Load bookmark | ||
a, ESC a Add current to bookmark | a, ESC a Add current to bookmark | ||
- | Search | + | </ |
+ | <code text | Search> | ||
/, C-s Search forward | /, C-s Search forward | ||
n Search next | n Search next | ||
w Toggle wrap search mode | w Toggle wrap search mode | ||
- | Mark operation | + | </ |
+ | <code text | Mark operation> | ||
C-SPC Set/ | C-SPC Set/ | ||
P Go to previous mark | P Go to previous mark | ||
N Go to next mark | N Go to next mark | ||
" Mark by regular expression | " Mark by regular expression | ||
- | Miscellany | + | </ |
+ | <code text | Miscellany> | ||
! Execute shell command | ! Execute shell command | ||
H, ? Help (load this file) | H, ? Help (load this file) | ||
Line 284: | Line 423: | ||
q Quit (with confirmation, | q Quit (with confirmation, | ||
Q Quit without confirmation | Q Quit without confirmation | ||
- | Line-edit mode | + | </ |
+ | <code text | Line-edit mode> | ||
C-f Move cursor forward | C-f Move cursor forward | ||
C-b Move cursor backward | C-b Move cursor backward | ||
Line 297: | Line 437: | ||
TAB, | TAB, | ||
RETURN Accept | RETURN Accept | ||
- | Mouse operation | + | </code> |
- | If w3m is compiled with mouse option and you are using xterm/kterm/rxvt (in this case, you have to set the TERM environment variable to `xterm' | + | |
+ | ==== Mouse operation ==== | ||
+ | |||
+ | If w3m is compiled with mouse option and you are using xterm/ | ||
+ | <code text> | ||
left click Move the cursor to the place pointed by the mouse cursor. If you click the cursor and it is on an anchor, follow the anchor. | left click Move the cursor to the place pointed by the mouse cursor. If you click the cursor and it is on an anchor, follow the anchor. | ||
middle click Back to the previous buffer. | middle click Back to the previous buffer. | ||
right click Open pop-up menu. You can choose an item by clicking it. | right click Open pop-up menu. You can choose an item by clicking it. | ||
left drag Scroll document. The default behavior is to grab the document and drag it. You can reverse the behavior (grab the window and drag it) with the option setting panel. | left drag Scroll document. The default behavior is to grab the document and drag it. You can reverse the behavior (grab the window and drag it) with the option setting panel. | ||
+ | </ | ||
- | Key customization | + | ==== Key customization |
- | You can customize the key binding (except line-editing keymap) by describing ~/ | + | |
- | + | ||
- | | + | |
+ | You can customize the key binding (except line-editing keymap) by describing ~/ | ||
+ | <code text> | ||
+ | keymap C-o NEXT_PAGE | ||
+ | </ | ||
- | binds `NEXT_PAGE' | + | binds `NEXT_PAGE' |
+ | See README.func for list of available functions. Original and Lynx-like keymap definitions are provided (keymap.default and keymap.lynx) as examples. | ||
+ | <code text> | ||
Local CGI | Local CGI | ||
- | You can run CGI scripts using w3m, without any HTTP server. It means that w3m behaves like an HTTP server and activates CGI script, then w3m reads the output of the script and display it. The bookmark registration and helper-app editor are realized as local CGI scripts. Using local CGI, w3m can be used as a general purpose form interface. | + | </ |
+ | You can run CGI scripts using w3m, without any HTTP server. | ||
+ | It means that w3m behaves like an HTTP server and activates CGI script, | ||
+ | then w3m reads the output of the script and display it. \\ | ||
+ | The bookmark registration and helper-app editor are realized as local CGI scripts. | ||
+ | Using local CGI, w3m can be used as a general purpose form interface. | ||
For security reason, CGI scripts invoked by w3m must be in one of these directories. | For security reason, CGI scripts invoked by w3m must be in one of these directories. | ||
Line 322: | Line 474: | ||
The CGI script can use special header `w3m-control:' | The CGI script can use special header `w3m-control:' | ||
+ | <code text> | ||
Content-Type: | Content-Type: | ||
W3m-control: | W3m-control: | ||
+ | </ | ||
will display blank page and delete that buffer immediately. This is useful when you don't want to display any page after the script is invoked. The next example | will display blank page and delete that buffer immediately. This is useful when you don't want to display any page after the script is invoked. The next example | ||
+ | <code text> | ||
Content-Type: | Content-Type: | ||
W3m-control: | W3m-control: | ||
+ | </ | ||
contents..... | contents..... | ||
Line 336: | Line 491: | ||
One w3m-control: | One w3m-control: | ||
+ | <code text> | ||
Content-Type: | Content-Type: | ||
W3m-control: | W3m-control: | ||
+ | </ | ||
This example works exactly the same way to the Location header: | This example works exactly the same way to the Location header: | ||
+ | <code text> | ||
Content-Type: | Content-Type: | ||
Location: http:// | Location: http:// | ||
+ | </ | ||
Note that this header has no effect when the CGI script is invoked through HTTP server. | Note that this header has no effect when the CGI script is invoked through HTTP server. |
w3m.1239318028.txt.gz · Last modified: 2020/08/10 02:29 (external edit)