-
Notifications
You must be signed in to change notification settings - Fork 1
/
lv.1
339 lines (339 loc) · 10.4 KB
/
lv.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
.TH LV 1 "v.4.51 (Jan.16th,2004)"
.SH NAME
lv \- a Powerful Multilingual File Viewer / Grep
.SH SYNOPSIS
.B lv, lgrep
.br
.B lv
-h
.br
.B lv
-V
.br
.B lv
[-[+]acdfgiklmnqsuvz]
.br
[-A\fIcoding-system\fP] [-I\fIcoding-system\fP] [-K\fIcoding-system\fP]
.br
[-O\fIcoding-system\fP] [-P\fIcoding-system\fP] [-D\fIcoding-system\fP]
.br
[-Ss\fIseq\fP] [-Sr\fIseq\fP] [-Sb\fIseq\fP] [-Su\fIseq\fP] [-Sh\fIseq\fP]
.br
[-T\fInumber\fP] [-W\fIwidth\fP] [-H\fIheight\fP] [-E'\fIeditor'\fP] [-+]
.br
[-] (\fIgrep pattern\fP) [\fIfiles ...\fP]
.SH DESCRIPTION
.IP "\fIMultilingual file viewer\fP"
\fIlv\fP is a powerful multilingual file viewer.
Apparently, lv looks like \fIless\fP (1),
a representative file viewer on UNIX as you know,
so UNIX people (and \fIless\fP people on other OSs)
don't have to learn a burdensome new interface.
lv can be used on MSDOS ANSI terminals and almost all UNIX platforms.
lv is a currently growing software,
so your feedback is welcome
and helpful for us to refine the future lv.
.IP "\fIMultiple coding systems\fP"
lv can decode and encode multilingual streams
through many coding systems, for example,
ISO 2022 based coding systems such as iso-2022-jp,
and EUC (Extended Unix Code) like euc-japan.
Furthermore,
localized coding systems
such as shift-jis, big5 and HZ are also supported.
lv can be used not only as a file viewer
but also as a coding-system translation filter
like \fInkf\fP (1) and \fItcs\fP (1).
.IP "\fIMultilingual regular expressions / Multilingual grep\fP"
lv can recognize multi-bytes patterns as regular expressions,
and lv also provides multilingual \fIgrep\fP (1) functionality
by giving it another name, \fIlgrep\fP.
Pattern matching is conducted in the charset level,
so an EUC fragment, for example,
can be found in the ISO 2022 tailored streams, of course.
.IP "\fISupporting the Unicode standard\fP"
lv provides Unicode facilities
which enables you to handle Unicode streams encoded in UTF-7 or UTF-8,
and lv can also convert their code-points
between Unicode and other charsets.
So you can display Unicode or foreign texts on your terminal,
using the code conversion function
to your favorite charsets via Unicode.
(However, MSDOS version of lv has none of the Unicode facility.)
.IP "\fIANSI escape sequence through\fP"
lv can recognize ANSI escape sequences for text decoration.
So you can look ANSI-decorated streams
such as colored source codes generated by another software
just like intended image on ANSI terminals.
.IP "\fICompletely original\fP"
lv is a completely original software
including no code drawn from \fIless\fP and \fIgrep\fP
and other programs at all.
.SH "OPTIONS"
.IP "-A<\fIcoding-system\fP>"
Set all coding systems to \fIcoding-system\fP.
.IP "-I<\fIcoding-system\fP>"
Set input coding system to \fIcoding-system\fP.
.IP "-K<\fIcoding-system\fP>"
Set keyboard coding system to \fIcoding-system\fP.
If it is not set, output coding system will be applied to it.
.IP "-O<\fIcoding-system\fP>"
Set output coding system to \fIcoding-system\fP.
.IP "-P<\fIcoding-system\fP>"
Set pathname coding system to \fIcoding-system\fP.
.IP "-D<\fIcoding-system\fP>"
Set default (fall-back) coding system to \fIcoding-system\fP.
.IP "coding-system:"
a: auto-select
.br
c: iso-2022-cn
.br
j: iso-2022-jp
.br
k: iso-2022-kr
.br
ec: euc-china
.br
ej: euc-japan
.br
ek: euc-korea
.br
et: euc-taiwan
.br
u7: UTF-7
.br
u8: UTF-8
.br
l1..9: iso-8859-1..9
.br
l0: iso-8859-10
.br
lb,ld,le,lf,lg: iso-8859-11,13,14,15,16
.br
s: shift-jis
.br
b: big5
.br
h: HZ
.br
r: raw mode
.IP "Examples:"
-Il2: input coding system is iso-8859-2
.br
-Ks: keyboard coding system is shift-jis
.br
-Oek: output coding system is euc-korea
.br
-Ab: all coding systems are big5
.IP "Coding-system translations / Code-points conversions:"
iso-2022-cn, -jp, -kr can be converted into euc-china or -taiwan,
euc-japan, euc-korea, respectively (and vice versa).
shift-jis uses the same internal code-points
as iso-2022-jp and euc-japan.
.sp
Since big5 characters can be converted into CNS 11643-1992
with negligible incompleteness,
big5 streams can be translated into iso-2022-cn or euc-taiwan
(and vice versa) with code-points conversion.
Note that the iso-2022-cn referred here is not GB sequence,
only just CNS one.
You should remember that lv cannot translate big5 into GB directly.
.sp
The search function of lv may not work correctly when lv additionally
performs ``code-points'' conversion
(not ``coding-system'' translation),
because visible code and internal code are different from each other.
lv will try to avoid this problem with
converting charsets of search patterns automatically,
but this function is not always perfect.
.IP "-W<\fInumber\fP>"
Screen width
.IP "-H<\fInumber\fP>"
Screen height
.IP "-E'<\fIeditor\fP>' (default 'vi -c %d')"
Editor name (default 'vi -c %d')
.br
``%d'' means the line number of current position in a file.
.IP "-q"
Assert there is delete/insert-lines control.
.br
Please set this option on a MSDOS ANSI terminal
that has capability to delete and/or insert lines.
As to termcap and terminfo version,
it will be set automatically.
.IP "-Ss<\fIseq\fP>"
Set ANSI Standout sequence to \fIseq\fP (default "7")
.IP "-Sr<\fIseq\fP>"
Set ANSI Reverse sequence to \fIseq\fP (default "7")
.IP "-Sb<\fIseq\fP>"
Set ANSI Blink sequence to \fIseq\fP (default "5")
.IP "-Su<\fIseq\fP>"
Set ANSI Underline sequence to \fIseq\fP (default "4")
.IP "-Sh<\fIseq\fP>"
Set ANSI Highlight sequence to \fIseq\fP (default "1")
.sp
These sequences are inserted
between ``ESC ['' and ``m''
to construct full ANSI escape sequences.
.br
.IP "-T<\fInumber\fP>"
Set Threshold-code which divides Unicode code-points in
two regions. Characters belonging to the lower region are
assumed to have a width of one, and the higher characters
are equated to a width of two. (Default: 12288, = 0x3000)
.IP "-m"
Force Unicode code-points which have the same glyphs as
iso-8859-* to be Mapped to iso-8859-* in a conversion from
Unicode to another character set which also has the
corresponding code-points, in particular, Asian charsets.
.br
.IP "-a"
Adjust character set for search pattern (default)
.IP "-c"
Allow ANSI escape sequences for text decoration (Color)
.IP "-d, -i"
Make regexp-searches ignore case (case folD search) (default)
.IP "-f"
Substitute Fixed strings for regular expressions
.IP "-k"
Convert X0201 Katakana to X0208 while decoding
.IP "-l"
Allow physical lines of each logical line printed on the screen
to be concatenated for cut and paste after screen refresh
.IP "-s"
Force old pages to be swept out from the screen Smoothly
.IP "-u"
Unify several character sets, eg. JIS X0208 and C6226.
In addition, lv equates ISO 646 variants,
eg. JIS X0201-Roman,
and unknown charsets with ASCII.
.IP "-g"
Turn on lgrep mode.
.IP "-n"
Prefix each line of output with the line number within its input file on lgrep.
.IP "-v"
Invert the sense of matching on lgrep.
.IP "-z"
Enable HZ auto-detection (also enabled by run-time C-t).
.br
.IP "-+"
Clear all options
.br
You can also turn OFF specified options,
using ``+<option>'' like +c, +d, ... +z.
.IP "-"
Treat the following arguments as filenames
.IP "\fIgrep pattern\fP"
lv works like \fIgrep\fP (1) when its name is \fIlgrep\fP
.IP "-V"
Show lv version
.IP "-h"
Show this help
.SH "CONFIGURATION"
Options can be described in configuration file ``.lv'' (``_lv'' on MSDOS)
located at you HOME directory. If and only if you use MSDOS, you can locate
``_lv'' at current working directory.
They can be also described in the environment variable LV.
Every configuration will be overloaded in this order if there is. Command line
options are always read finally.
.SH "COMMAND KEY BINDINGS"
.IP "0..9:"
Argument
.IP "g, <:"
Jump to the line number (default: top of the file)
.IP "G, >:"
Jump to the line number (default: bottom of the file)
.IP "p:"
Jump to the percentage position in line numbers (0-100)
.IP "b, C-b:"
Previous page
.IP "u, C-u:"
Previous half page
.IP "k, w, C-k, y, C-y, C-p:"
Previous line
.IP "j, C-j, e, C-e, C-n, CR:"
Next line
.IP "d, C-d:"
Next half page
.IP "f, C-f, C-v, SP:"
Next page
.IP "F:"
Jump to the end of file, and wait for a data to be appended to
the file until interrupted.
.IP "/<string>:"
Find a string in the forward direction (regular expression)
.IP "?<string>:"
Find a string in the backward direction (regular expression)
.IP "n:"
Repeat previous search in forward direction
.IP "N:"
Repeat previous search in backward direction (not REVERSE)
.IP "C-l:"
Redisplay all lines
.IP "r, C-r:"
Refresh screen and memory
.IP "R:"
Reload current file
.IP ":n:"
Examine the next file
.IP ":p:"
Examine the previous file
.IP "t:"
Toggle input coding systems
.IP "T:"
Toggle input coding systems reversely
.IP "C-t:"
Toggle HZ decoding mode
.IP "v:"
Launch the editor defined by option -E
.IP "C-g, =:"
Show file information (filename, position, coding system)
.IP "V:"
Show LV version
.IP "C-z:"
Suspend (call SHELL or ``command.com'' under MSDOS)
.IP "q, Q:"
Quit
.IP "UP/DOWN:"
Previous/Next line
.IP "LEFT/RIGHT:"
Previous/Next half page
.IP "PageUp/PageDown:"
Previous/Next page
.SH "HOW TO INPUT SEARCH STRINGS?"
.IP "C-m, Enter:"
Enter the current string
.IP "C-h, BS, DEL:"
Delete one character (backspace)
.IP "C-u:"
Cancel the current string and try again
.IP "C-p:"
Restore a few old strings incrementally (history)
.IP "C-g:"
Quit
.SH "REGULAR EXPRESSION"
Special characters are ^, $, ., *, +, ?, [, ^, -, ], \\.
\\| specifies an alternative. \\(, \\) is a grouping construct.
\\1 and \\2 matches any charset consists of one- or two- column(s)
characters respectively. Mutually overlapping ranges (or charset)
are not guaranteed.
.SH "SEE ALSO"
LV Homepage: http://www.ff.iij4u.or.jp/~nrt/lv/
.SH "COPYRIGHT"
All rights reserved. Copyright (C) 1996-2004 by NARITA Tomio.
.sp
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.sp
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.sp
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
.SH "BUG REPORT"
Please send bug reports to: [email protected]