| 1 |
'\" t |
| 2 |
.\" $XConsortium: xedit.man,v 1.23 94/04/17 20:43:39 matt Exp $ |
| 3 |
.\" Copyright (c) 1994 X Consortium |
| 4 |
.\" |
| 5 |
.\" Permission is hereby granted, free of charge, to any person obtaining |
| 6 |
.\" a copy of this software and associated documentation files (the |
| 7 |
.\" "Software"), to deal in the Software without restriction, including |
| 8 |
.\" without limitation the rights to use, copy, modify, merge, publish, |
| 9 |
.\" distribute, sublicense, and/or sell copies of the Software, and to |
| 10 |
.\" permit persons to whom the Software is furnished to do so, subject to |
| 11 |
.\" the following conditions: |
| 12 |
.\" |
| 13 |
.\" The above copyright notice and this permission notice shall be included |
| 14 |
.\" in all copies or substantial portions of the Software. |
| 15 |
.\" |
| 16 |
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 17 |
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 18 |
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 19 |
.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 20 |
.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 21 |
.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 22 |
.\" OTHER DEALINGS IN THE SOFTWARE. |
| 23 |
.\" |
| 24 |
.\" Except as contained in this notice, the name of the X Consortium shall |
| 25 |
.\" not be used in advertising or otherwise to promote the sale, use or |
| 26 |
.\" other dealings in this Software without prior written authorization |
| 27 |
.\" from the X Consortium. |
| 28 |
.\" |
| 29 |
.\" $XFree86: xc/programs/xedit/xedit.man,v 1.18 2002/10/12 16:06:48 herrb Exp $ |
| 30 |
.\" |
| 31 |
.TH XEDIT 1 "xedit 1.2.3" "X Version 11" |
| 32 |
.SH NAME |
| 33 |
xedit \- simple text editor for X |
| 34 |
.SH SYNTAX |
| 35 |
.B xedit |
| 36 |
[ |
| 37 |
.I \-toolkitoption |
| 38 |
\&.\|.\|. ] [ |
| 39 |
.I filename |
| 40 |
\&.\|.\|. ] |
| 41 |
.SH DESCRIPTION |
| 42 |
.I Xedit |
| 43 |
provides a window consisting of the following four areas: |
| 44 |
.IP "Commands Section" 25 |
| 45 |
A set of commands that allow you to exit \fIxedit\fP, save the file, or |
| 46 |
load a new file into the edit window. |
| 47 |
.IP "Message Window" 25 |
| 48 |
Displays \fIxedit\fP messages. In addition, this window can be also used as |
| 49 |
a scratch pad. |
| 50 |
.IP "Filename Display" |
| 51 |
Displays the name of the file currently being edited, and whether this file |
| 52 |
is \fIRead-Write\fP or \fIRead Only\fP. |
| 53 |
.IP "Edit Window" 25 |
| 54 |
Displays the text of the file that you are editing or creating. |
| 55 |
.SH OPTIONS |
| 56 |
.I Xedit |
| 57 |
accepts all of the standard X Toolkit command line |
| 58 |
options (see |
| 59 |
.IR X (7)). |
| 60 |
The order of the command line options is not important. |
| 61 |
.TP 8 |
| 62 |
.I filename |
| 63 |
Specifies the file(s) that are to be loaded during start-up. This is the |
| 64 |
file which will be edited. If a file is not specified, |
| 65 |
.I xedit |
| 66 |
lets you load files or create new files after it has started up. |
| 67 |
.SH EDITING |
| 68 |
The Athena Text widget is used for the three sections of this |
| 69 |
application that allow text input. The characters typed will go to |
| 70 |
the Text widget that has the input focus, or the Text widget that the pointer |
| 71 |
cursor is currently over. |
| 72 |
.PP |
| 73 |
|
| 74 |
The following keystroke combinations are defined: |
| 75 |
.sp |
| 76 |
.TS |
| 77 |
l l. |
| 78 |
Ctrl-a Beginning Of Line |
| 79 |
Meta-b Backward Word |
| 80 |
Ctrl-b Backward Character |
| 81 |
Meta-f Forward Word |
| 82 |
Ctrl-d Delete Next Character |
| 83 |
Meta-i Insert File |
| 84 |
Ctrl-e End Of Line |
| 85 |
Meta-k Kill To End Of Paragraph |
| 86 |
Ctrl-f Forward Character |
| 87 |
Meta-q Form Paragraph |
| 88 |
Ctrl-g Keyboard Reset |
| 89 |
Meta-v Previous Page |
| 90 |
Ctrl-h Delete Previous Character |
| 91 |
Meta-y Insert Current Selection |
| 92 |
Ctrl-j Newline And Indent |
| 93 |
Meta-z Scroll One Line Down |
| 94 |
Ctrl-k Kill To End Of Line |
| 95 |
Meta-d Delete Next Word |
| 96 |
Ctrl-l Redraw Display |
| 97 |
Meta-D Kill Word |
| 98 |
Ctrl-m Newline |
| 99 |
Meta-h Delete Previous Word |
| 100 |
Ctrl-n Next Line |
| 101 |
Meta-H Backward Kill Word |
| 102 |
Ctrl-o Newline And Backup |
| 103 |
Meta-< Beginning Of File |
| 104 |
Ctrl-p Previous Line |
| 105 |
Meta-> End Of File |
| 106 |
Ctrl-r Search/Replace Backward |
| 107 |
Meta-] Forward Paragraph |
| 108 |
Ctrl-s Search/Replace Forward |
| 109 |
Meta-[ Backward Paragraph |
| 110 |
Ctrl-t Transpose Characters |
| 111 |
Ctrl-u [\fInumber\fP] Multiply by 4 or \fInumber\fP |
| 112 |
Meta-Delete Delete Previous Word |
| 113 |
Ctrl-v Next Page |
| 114 |
Meta-Shift Delete Kill Previous Word |
| 115 |
Ctrl-w Kill Selection |
| 116 |
Meta-Backspace Delete Previous Word |
| 117 |
Ctrl-y Unkill |
| 118 |
Meta-Shift Backspace Kill Previous Word |
| 119 |
Ctrl-z Scroll One Line Up |
| 120 |
Meta-z Scroll One Line Down |
| 121 |
Ctrl-_ Undo |
| 122 |
Escape Line Edit Mode |
| 123 |
.TE |
| 124 |
.sp |
| 125 |
In addition, the pointer may be used to cut and paste text: |
| 126 |
.TS |
| 127 |
l l. |
| 128 |
Button 1 Down Start Selection |
| 129 |
Button 1 Motion Adjust Selection |
| 130 |
Button 1 Up End Selection (cut) |
| 131 |
|
| 132 |
Button 2 Down Insert Current Selection (paste) |
| 133 |
|
| 134 |
Button 3 Down Extend Current Selection |
| 135 |
Button 3 Motion Adjust Selection |
| 136 |
Button 3 Up End Selection (cut) |
| 137 |
.TE |
| 138 |
.sp |
| 139 |
|
| 140 |
.SH LINE EDIT MODE |
| 141 |
.I Line edit mode |
| 142 |
enables several shortcut commands for searching and replacing text in a |
| 143 |
xedit buffer. |
| 144 |
.I Line edit mode |
| 145 |
commands have the format: |
| 146 |
.br |
| 147 |
.nf |
| 148 |
|
| 149 |
[\fIline-number\fP[,\fIline-number\fP]]\fIcommand\fP[\fIparameters\fP] |
| 150 |
|
| 151 |
.fi |
| 152 |
.I Line number |
| 153 |
may be specified as: |
| 154 |
.TP 8 |
| 155 |
\&. |
| 156 |
The current text line. |
| 157 |
.TP 8 |
| 158 |
$ |
| 159 |
The last line of the file. |
| 160 |
.TP 8 |
| 161 |
number |
| 162 |
The literal line \fInumber\fP. |
| 163 |
.TP 8 |
| 164 |
- or ^ |
| 165 |
The previous line. Equivalent to \fI-1\fP. |
| 166 |
.TP 8 |
| 167 |
-number or ^number |
| 168 |
The current line minus \fInumber\fP. |
| 169 |
.TP 8 |
| 170 |
+ |
| 171 |
The next line. Equivalent to \fI+1\fP. |
| 172 |
.TP 8 |
| 173 |
+number |
| 174 |
The current line plus \fInumber\fP. |
| 175 |
.TP 8 |
| 176 |
, or % |
| 177 |
From the first to the last line. Equivalent to \fI1,$\fP. |
| 178 |
.TP 8 |
| 179 |
; |
| 180 |
From the current to the last line. Equivalent to \fI.,$\fP. |
| 181 |
|
| 182 |
.PP |
| 183 |
.I Command |
| 184 |
may be specified as: |
| 185 |
.TP 8 |
| 186 |
s |
| 187 |
Substitute text in the specified lines. |
| 188 |
.TP 8 |
| 189 |
/re/ |
| 190 |
Search forward for the regular expression pattern \fIre\fP. |
| 191 |
.TP 8 |
| 192 |
?re? |
| 193 |
Search backward for the regular expression pattern \fIre\fP. |
| 194 |
|
| 195 |
.PP |
| 196 |
.I Parameters |
| 197 |
may be specified as: |
| 198 |
.TP 8 |
| 199 |
/re/ |
| 200 |
Works as a parameter to \fIi\fP or as a command. |
| 201 |
.TP 8 |
| 202 |
/re/text/ |
| 203 |
Search forward for \fIre\fP and substitute by \fItext\fP. |
| 204 |
|
| 205 |
.PP |
| 206 |
.I Options |
| 207 |
may follow or be parameters, known values are: |
| 208 |
.TP 8 |
| 209 |
i |
| 210 |
Case insensitive search. |
| 211 |
.TP 8 |
| 212 |
g |
| 213 |
\fIGlobal\fP match when replacing text. Unless specified, only the nth, |
| 214 |
that defaults to 1, match will be replaced. |
| 215 |
.TP 8 |
| 216 |
c |
| 217 |
\fIConfirm\fP before replacing text. |
| 218 |
.TP 8 |
| 219 |
number |
| 220 |
Replace only the occurrence referenced by \fInumber\fP. |
| 221 |
.PP |
| 222 |
|
| 223 |
Commands accept some variations, examples: |
| 224 |
.br |
| 225 |
.nf |
| 226 |
/pattern/i |
| 227 |
i/pattern/ |
| 228 |
i/pattern |
| 229 |
.fi |
| 230 |
Search forward for \fIpattern\fP. |
| 231 |
.br |
| 232 |
.nf |
| 233 |
|
| 234 |
,sc/pattern/text |
| 235 |
,sc/pattern/text/ |
| 236 |
,s/pattern/text/c |
| 237 |
.fi |
| 238 |
Search the entire buffer and ask confirmation to replace \fIpattern\fP |
| 239 |
with \fItext\fP. |
| 240 |
.br |
| 241 |
.nf |
| 242 |
|
| 243 |
,s/pattern/text/number |
| 244 |
.fi |
| 245 |
Replace the match \fInumber\fP in the text line. If not specified, |
| 246 |
defaults to the first occurrence. |
| 247 |
|
| 248 |
.PP |
| 249 |
When searching for text, type <Return> to go to the next match. |
| 250 |
When interactively replacing text, type \fIy\fP or \fIY\fP to accept the |
| 251 |
change, and \fIn\fP or \fIN\fP to ignore it and go to the next match. |
| 252 |
|
| 253 |
.SH COMMANDS |
| 254 |
.IP Quit 8 |
| 255 |
Quits the current editing session. If any changes have not been saved, |
| 256 |
.I xedit |
| 257 |
displays a warning message, allowing the user to save them. |
| 258 |
.IP Save |
| 259 |
If file backups are enabled (see RESOURCES, below) |
| 260 |
.I xedit |
| 261 |
stores a copy of the |
| 262 |
original, unedited file in <prefix>\fIfile\fP<suffix>, |
| 263 |
then overwrites the \fIfile\fP with the contents of the edit window. The |
| 264 |
filename is retrieved from the Text widget directly to the right of |
| 265 |
the \fILoad\fP button. |
| 266 |
.IP Load |
| 267 |
Loads the file named in the text widget immediately to the right |
| 268 |
of the this button and displays it in the Edit window. |
| 269 |
.SH RESOURCES |
| 270 |
For \fIxedit\fP the available resources are: |
| 271 |
.TP 8 |
| 272 |
.B tagsName (\fPClass\fB TagsName) |
| 273 |
Specifies the name of the tags file to search when loading a new file. |
| 274 |
Default value is \fItags\fP. |
| 275 |
.TP 8 |
| 276 |
.B loadTags (\fPClass\fB LoadTags) |
| 277 |
Boolean value to enable or disabling searching for tags files. |
| 278 |
Default is \fITrue\fP. |
| 279 |
.TP 8 |
| 280 |
.B enableBackups (\fPClass\fB EnableBackups) |
| 281 |
Specifies that, when edits made to an existing file are saved, |
| 282 |
.I xedit |
| 283 |
is to copy the original version of that file to <prefix>\fIfile\fP<suffix> |
| 284 |
before it saves the changes. The default value for this resource is |
| 285 |
``on,'' stating that backups should be created. |
| 286 |
.TP 8 |
| 287 |
.B backupNamePrefix (\fPClass\fB BackupNamePrefix) |
| 288 |
Specifies a string that is to be prepended to the backup filename. The |
| 289 |
default is that no string shall be prepended. |
| 290 |
.TP 8 |
| 291 |
.B backupNameSuffix (\fPClass\fB BackupNameSuffix) |
| 292 |
Specifies a string that is to be appended to the backup filename. The |
| 293 |
default is to use ``~'' as the suffix. |
| 294 |
.TP 8 |
| 295 |
.B positionFormat (\fPClass\fB Format) |
| 296 |
Specifies a format string used to display the cursor position. This |
| 297 |
string uses printf(3) like notation, where |
| 298 |
.B %l |
| 299 |
prints the line number, |
| 300 |
.B %c |
| 301 |
prints the column number, |
| 302 |
.B %p |
| 303 |
prints the insert position offset, and |
| 304 |
.B %s |
| 305 |
prints the current file size. It is also allowed to specify field sizes, |
| 306 |
with the notation |
| 307 |
.B %\-?[0\-9]+ |
| 308 |
\&. The default format string is ``L%l'', which shows the character ``L'' |
| 309 |
followed by the line number. |
| 310 |
.TP 8 |
| 311 |
.B hints (\fPClass\fB Hints) |
| 312 |
Specifies a list of strings, separated by new lines, that will be |
| 313 |
displayed in the bc_label window. |
| 314 |
.TP 8 |
| 315 |
.B hintsInterval (\fPClass \fBInterval) |
| 316 |
Specifies the interval in seconds, which the hint string in the bc_label |
| 317 |
window will be changed. |
| 318 |
.TP 8 |
| 319 |
.B changedBitmap (\fPClass \fBBitmap) |
| 320 |
Specifies the name of the Bitmap that will be displayed in the fileMenu, when |
| 321 |
the file being edited is changed. |
| 322 |
.TP 8 |
| 323 |
.B autoReplace (\fPClass \fBReplace) |
| 324 |
This resource is useful to automatically correct common misspelling errors, but |
| 325 |
can also be used to create simple macros. The format is |
| 326 |
\fI{non-blanks}{blanks}[{string}]\fP. Fields are separated by newlines. |
| 327 |
Example of use: |
| 328 |
\" |
| 329 |
.br |
| 330 |
.nf |
| 331 |
nto not\\n\\ |
| 332 |
/macro some long string with \\\\\\n newlines \\\\\\n |
| 333 |
.fi |
| 334 |
\" |
| 335 |
.br |
| 336 |
Will automatically replace the word \fInto\fP by \fInot\fP, and \fI/macro\fP |
| 337 |
by \fIsome long string with |
| 338 |
newlines |
| 339 |
\fP |
| 340 |
when you type that words. |
| 341 |
.TP 8 |
| 342 |
.B ispell.dictionaries (\fPClass \fBispell.Dictionary) |
| 343 |
Specifies a list of dictionary names, separated by spaces, available to the |
| 344 |
ispell program. The default value is \fI"american americamed+ english"\fP. |
| 345 |
.TP 8 |
| 346 |
.B ispell.dictionary (\fPClass \fBispell.Dictionary) |
| 347 |
Specifies the default dictionary to use. |
| 348 |
.TP 8 |
| 349 |
.B ispell*<DICTIONARY>.wordChars (\fPClass \fBispell*Chars) |
| 350 |
Specifies a set of characters that can be part of a legal word. The |
| 351 |
\fI<DICTIONARY>\fP field is one of the dictionaries specified in the |
| 352 |
\fIdictionaries\fP resource. |
| 353 |
.TP 8 |
| 354 |
.B ispell.ispellCommand (\fPClass \fBispell.CommandLine) |
| 355 |
The path to the ispell program, and possibly, additional arguments. You don't |
| 356 |
need to specify the ``-w'' option, neither the ``-a'' option. |
| 357 |
Refer to the \fIispell\fP(1) manpage for more information on ispell options. |
| 358 |
.TP 8 |
| 359 |
.B ispell.formatting (\fPClass \fPispell.TextFormat) |
| 360 |
Specifies which text formatting to use while spell checking the file. The |
| 361 |
available formats are \fItext\fP and \fIhtml\fP. |
| 362 |
.TP 8 |
| 363 |
.B ispell*text.skipLines (\fPClass \fBispell*text.Skip) |
| 364 |
Lines starting with one of the characters in this string will not be spell |
| 365 |
checked. This resource is only used in \fItext\fP mode. |
| 366 |
.TP 8 |
| 367 |
.B ispell.terseMode (\fPClass \fBispell.Terse) |
| 368 |
When enabled, runs ispell in terse mode, not asking user interaction for words |
| 369 |
generated through compound formation (when using the ispell ``-C'' option), or |
| 370 |
words generated through affix removal. The default value is False. |
| 371 |
.TP 8 |
| 372 |
.B ispell.lookCommand (\fPClass \fBispell.CommandLine) |
| 373 |
The path to the program to search for alternate words, and possibly, |
| 374 |
additional arguments. The default program used is \fI/usr/bin/egrep\fP. |
| 375 |
.TP 8 |
| 376 |
.B ispell.wordsFile (\fPClass \fBispell.Words) |
| 377 |
The path to the file[s] to search for alternate words. The default file is |
| 378 |
\fI/usr/share/dict/words\fP. |
| 379 |
.TP 8 |
| 380 |
.B ispell.guessLabel (\fPClass \fBispell.Status) |
| 381 |
String displayed in the ispell status bar when ispell returns a guess list |
| 382 |
of one or more words. The default value is \fIGuess\fP. |
| 383 |
.TP 8 |
| 384 |
.B ispell.missLabel (\fPClass \fBispell.Status) |
| 385 |
String displayed in the ispell status bar when ispell returns a list of one |
| 386 |
or more words to match a misspelled one. The default value is \fIMiss\fP. |
| 387 |
.TP 8 |
| 388 |
.B ispell.rootLabel (\fPClass \fBispell.Status) |
| 389 |
String displayed in the ispell status bar when the word is not in the dictionary, |
| 390 |
but it can be formed through a root one. The default value is \fIRoot:\fP, and is |
| 391 |
followed by a space and the root word. |
| 392 |
.TP 8 |
| 393 |
.B ispell.noneLabel (\fPClass \fBispell.Status) |
| 394 |
String displayed in the ispell status bar when there is no near misses. The default |
| 395 |
value is \fINone\fP. |
| 396 |
.TP 8 |
| 397 |
.B ispell.compoundLabel (\fPClass \fBispell.Status) |
| 398 |
String displayed in the ispell status bar when the word being checked is formed by |
| 399 |
concatenation of two words. The default value is \fICompound\fP. |
| 400 |
.TP 8 |
| 401 |
.B ispell.okLabel (\fPClass \fBispell.Status) |
| 402 |
String displayed in the ispell status bar when the checked word is in the dictionary. |
| 403 |
This string is only displayed when using the \fIcheck\fP button in the xedit ispell |
| 404 |
interface. The default value is \fIOk\fP. |
| 405 |
.TP 8 |
| 406 |
.B ispell.eofLabel (\fPClass \fBispell.Status) |
| 407 |
The string displayed in the ispell status bar when the end of the file is reached. |
| 408 |
The default value is \fIEnd Of File\fP. |
| 409 |
.TP 8 |
| 410 |
.B ispell.repeatLabel (\fPClass \fBispell.Status) |
| 411 |
The string displayed in the ispell status bar when two identical words are found |
| 412 |
together in the file. The default value is \fIRepeat\fP. |
| 413 |
.TP 8 |
| 414 |
.B ispell.lookLabel (\fPClass \fBispell.Status) |
| 415 |
The string displayed in the ispell status bar after displaying the results of |
| 416 |
the \fILook\fP command. If no results are found, the value of the |
| 417 |
\fIispell.noneLabel\fP resource is shown. |
| 418 |
.TP 8 |
| 419 |
.B ispell.workingLabel (\fPClass \fBispell.Status) |
| 420 |
The string displayed in the ispell status bar while xedit is communicating with |
| 421 |
ispell. The default value is \fI...\fP. |
| 422 |
.SH WIDGETS |
| 423 |
In order to specify resources, it is useful to know the hierarchy of |
| 424 |
the widgets which compose \fIxedit\fR. In the notation below, |
| 425 |
indentation indicates hierarchical structure. The widget class name |
| 426 |
is given first, followed by the widget instance name. |
| 427 |
.sp |
| 428 |
.nf |
| 429 |
.ft CW |
| 430 |
Xedit xedit |
| 431 |
Paned paned |
| 432 |
Paned buttons |
| 433 |
Command quit |
| 434 |
Command save |
| 435 |
Command load |
| 436 |
Text filename |
| 437 |
Label bc_label |
| 438 |
Text messageWindow |
| 439 |
Label labelWindow |
| 440 |
Text editWindow |
| 441 |
.ft |
| 442 |
.fi |
| 443 |
.sp |
| 444 |
.SH ENVIRONMENT |
| 445 |
.PP |
| 446 |
.TP 20 |
| 447 |
.I DISPLAY |
| 448 |
to get the default host and display number. |
| 449 |
.TP 20 |
| 450 |
.I XENVIRONMENT |
| 451 |
to get the name of a resource file that overrides the global resources |
| 452 |
stored in the RESOURCE_MANAGER property. |
| 453 |
.SH FILES |
| 454 |
.TP 20 |
| 455 |
.I /etc/X11/app-defaults/Xedit |
| 456 |
specifies required resources |
| 457 |
.SH "SEE ALSO" |
| 458 |
.IR X (7), |
| 459 |
.IR xrdb (1), |
| 460 |
.I "Athena Widget Set" |
| 461 |
.SH RESTRICTIONS |
| 462 |
Xedit is not a replacement to Emacs. |
| 463 |
.SH AUTHORS |
| 464 |
Chris D. Peterson, MIT X Consortium |
| 465 |
.br |
| 466 |
Paulo Cesar Pereira de Andrade, The XFree86 Project |