man-pages/man1/xedit.1.html
2021-03-31 01:06:50 +01:00

591 lines
18 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of XEDIT</TITLE>
</HEAD><BODY>
<H1>XEDIT</H1>
Section: User Commands (1)<BR>Updated: xedit 1.2.2<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
xedit - simple text editor for X
<A NAME="lbAC">&nbsp;</A>
<H2>SYNTAX</H2>
<B>xedit</B>
[
<I>-toolkitoption</I>
... ] [
<I>filename</I>
... ]
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<I>Xedit</I>
provides a window consisting of the following four areas:
<DL COMPACT>
<DT id="1">Commands Section<DD>
A set of commands that allow you to exit <I>xedit</I>, save the file, or
load a new file into the edit window.
<DT id="2">Message Window<DD>
Displays <I>xedit</I> messages. In addition, this window can be also used as
a scratch pad.
<DT id="3">Filename Display<DD>
Displays the name of the file currently being edited, and whether this file
is <I>Read-Write</I> or <I>Read Only</I>.
<DT id="4">Edit Window<DD>
Displays the text of the file that you are editing or creating.
</DL>
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<I>Xedit</I>
accepts all of the standard X Toolkit command line
options (see
<I><A HREF="/cgi-bin/man/man2html?7+X">X</A></I>(7)).
The order of the command line options is not important.
<DL COMPACT>
<DT id="5"><I>filename</I>
<DD>
Specifies the file(s) that are to be loaded during start-up. This is the
file which will be edited. If a file is not specified,
<I>xedit</I>
lets you load files or create new files after it has started up.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>EDITING</H2>
The Athena Text widget is used for the three sections of this
application that allow text input. The characters typed will go to
the Text widget that has the input focus, or the Text widget that the pointer
cursor is currently over.
<P>
<P>
The following keystroke combinations are defined:
<P>
<TABLE>
<TR VALIGN=top><TD>Ctrl-a</TD><TD>Beginning Of Line<BR></TD></TR>
<TR VALIGN=top><TD>Meta-b</TD><TD>Backward Word<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-b</TD><TD>Backward Character<BR></TD></TR>
<TR VALIGN=top><TD>Meta-f</TD><TD>Forward Word<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-d</TD><TD>Delete Next Character<BR></TD></TR>
<TR VALIGN=top><TD>Meta-i</TD><TD>Insert File<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-e</TD><TD>End Of Line<BR></TD></TR>
<TR VALIGN=top><TD>Meta-k</TD><TD>Kill To End Of Paragraph<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-f</TD><TD>Forward Character<BR></TD></TR>
<TR VALIGN=top><TD>Meta-q</TD><TD>Form Paragraph<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-g</TD><TD>Keyboard Reset<BR></TD></TR>
<TR VALIGN=top><TD>Meta-v</TD><TD>Previous Page<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-h</TD><TD>Delete Previous Character<BR></TD></TR>
<TR VALIGN=top><TD>Meta-y</TD><TD>Insert Current Selection<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-j</TD><TD>Newline And Indent<BR></TD></TR>
<TR VALIGN=top><TD>Meta-z</TD><TD>Scroll One Line Down<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-k</TD><TD>Kill To End Of Line<BR></TD></TR>
<TR VALIGN=top><TD>Meta-d</TD><TD>Delete Next Word<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-l</TD><TD>Redraw Display<BR></TD></TR>
<TR VALIGN=top><TD>Meta-D</TD><TD>Kill Word<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-m</TD><TD>Newline<BR></TD></TR>
<TR VALIGN=top><TD>Meta-h</TD><TD>Delete Previous Word<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-n</TD><TD>Next Line<BR></TD></TR>
<TR VALIGN=top><TD>Meta-H</TD><TD>Backward Kill Word<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-o</TD><TD>Newline And Backup<BR></TD></TR>
<TR VALIGN=top><TD>Meta-&lt;</TD><TD>Beginning Of File<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-p</TD><TD>Previous Line<BR></TD></TR>
<TR VALIGN=top><TD>Meta-&gt;</TD><TD>End Of File<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-r</TD><TD>Search/Replace Backward<BR></TD></TR>
<TR VALIGN=top><TD>Meta-]</TD><TD>Forward Paragraph<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-s</TD><TD>Search/Replace Forward<BR></TD></TR>
<TR VALIGN=top><TD>Meta-[</TD><TD>Backward Paragraph<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-t</TD><TD>Transpose Characters<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-u [<I>number</I>]</TD><TD>Multiply by 4 or <I>number</I><BR></TD></TR>
<TR VALIGN=top><TD>Meta-Delete</TD><TD>Delete Previous Word<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-v</TD><TD>Next Page<BR></TD></TR>
<TR VALIGN=top><TD>Meta-Shift Delete</TD><TD>Kill Previous Word<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-w</TD><TD>Kill Selection<BR></TD></TR>
<TR VALIGN=top><TD>Meta-Backspace</TD><TD>Delete Previous Word<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-y</TD><TD>Unkill<BR></TD></TR>
<TR VALIGN=top><TD>Meta-Shift Backspace</TD><TD>Kill Previous Word<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-z</TD><TD>Scroll One Line Up<BR></TD></TR>
<TR VALIGN=top><TD>Meta-z</TD><TD>Scroll One Line Down<BR></TD></TR>
<TR VALIGN=top><TD>Ctrl-_</TD><TD>Undo<BR></TD></TR>
<TR VALIGN=top><TD>Escape</TD><TD>Line Edit Mode<BR></TD></TR>
</TABLE>
<P>
In addition, the pointer may be used to cut and paste text:
<TABLE>
<TR VALIGN=top><TD>Button 1 Down</TD><TD>Start Selection<BR></TD></TR>
<TR VALIGN=top><TD>Button 1 Motion</TD><TD>Adjust Selection<BR></TD></TR>
<TR VALIGN=top><TD>Button 1 Up</TD><TD>End Selection (cut)<BR></TD></TR>
<TR VALIGN=top><TD></TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>Button 2 Down</TD><TD>Insert Current Selection (paste)<BR></TD></TR>
<TR VALIGN=top><TD></TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>Button 3 Down</TD><TD>Extend Current Selection<BR></TD></TR>
<TR VALIGN=top><TD>Button 3 Motion</TD><TD>Adjust Selection<BR></TD></TR>
<TR VALIGN=top><TD>Button 3 Up</TD><TD>End Selection (cut)<BR></TD></TR>
</TABLE>
<P>
<P>
<A NAME="lbAG">&nbsp;</A>
<H2>LINE EDIT MODE</H2>
<I>Line edit mode</I>
enables several shortcut commands for searching and replacing text in a
xedit buffer.
<I>Line edit mode</I>
commands have the format:
<BR>
<PRE>
[<I>line-number</I>[,<I>line-number</I>]]<I>command</I>[<I>parameters</I>]
</PRE>
<I>Line number</I>
may be specified as:
<DL COMPACT>
<DT id="6">.<DD>
The current text line.
<DT id="7">$<DD>
The last line of the file.
<DT id="8">number<DD>
The literal line <I>number</I>.
<DT id="9">- or ^<DD>
The previous line. Equivalent to <I>-1</I>.
<DT id="10">-number or ^number<DD>
The current line minus <I>number</I>.
<DT id="11">+<DD>
The next line. Equivalent to <I>+1</I>.
<DT id="12">+number<DD>
The current line plus <I>number</I>.
<DT id="13">, or %<DD>
From the first to the last line. Equivalent to <I>1,$</I>.
<DT id="14">;<DD>
From the current to the last line. Equivalent to <I>.,$</I>.
<P>
</DL>
<P>
<I>Command</I>
may be specified as:
<DL COMPACT>
<DT id="15">s<DD>
Substitute text in the specified lines.
<DT id="16">/re/<DD>
Search forward for the regular expression pattern <I>re</I>.
<DT id="17">?re?<DD>
Search backward for the regular expression pattern <I>re</I>.
<P>
</DL>
<P>
<I>Parameters</I>
may be specified as:
<DL COMPACT>
<DT id="18">/re/<DD>
Works as a parameter to <I>i</I> or as a command.
<DT id="19">/re/text/<DD>
Search forward for <I>re</I> and substitute by <I>text</I>.
<P>
</DL>
<P>
<I>Options</I>
may follow or be parameters, known values are:
<DL COMPACT>
<DT id="20">i<DD>
Case insensitive search.
<DT id="21">g<DD>
<I>Global</I> match when replacing text. Unless specified, only the nth,
that defaults to 1, match will be replaced.
<DT id="22">c<DD>
<I>Confirm</I> before replacing text.
<DT id="23">number<DD>
Replace only the occurrence referenced by <I>number</I>.
</DL>
<P>
<P>
Commands accept some variations, examples:
<BR>
<PRE>
/pattern/i
i/pattern/
i/pattern
</PRE>
Search forward for <I>pattern</I>.
<BR>
<PRE>
,sc/pattern/text
,sc/pattern/text/
,s/pattern/text/c
</PRE>
Search the entire buffer and ask confirmation to replace <I>pattern</I>
with <I>text</I>.
<BR>
<PRE>
,s/pattern/text/number
</PRE>
Replace the match <I>number</I> in the text line. If not specified,
defaults to the first occurrence.
<P>
<P>
When searching for text, type &lt;Return&gt; to go to the next match.
When interactively replacing text, type <I>y</I> or <I>Y</I> to accept the
change, and <I>n</I> or <I>N</I> to ignore it and go to the next match.
<P>
<A NAME="lbAH">&nbsp;</A>
<H2>COMMANDS</H2>
<DL COMPACT>
<DT id="24">Quit<DD>
Quits the current editing session. If any changes have not been saved,
<I>xedit</I>
displays a warning message, allowing the user to save them.
<DT id="25">Save<DD>
If file backups are enabled (see RESOURCES, below)
<I>xedit</I>
stores a copy of the
original, unedited file in &lt;prefix&gt;<I>file</I>&lt;suffix&gt;,
then overwrites the <I>file</I> with the contents of the edit window. The
filename is retrieved from the Text widget directly to the right of
the <I>Load</I> button.
<DT id="26">Load<DD>
Loads the file named in the text widget immediately to the right
of the this button and displays it in the Edit window.
</DL>
<A NAME="lbAI">&nbsp;</A>
<H2>RESOURCES</H2>
For <I>xedit</I> the available resources are:
<DL COMPACT>
<DT id="27"><B>tagsName (</B>Class<B> TagsName)</B>
<DD>
Specifies the name of the tags file to search when loading a new file.
Default value is <I>tags</I>.
<DT id="28"><B>loadTags (</B>Class<B> LoadTags)</B>
<DD>
Boolean value to enable or disabling searching for tags files.
Default is <I>True</I>.
<DT id="29"><B>enableBackups (</B>Class<B> EnableBackups)</B>
<DD>
Specifies that, when edits made to an existing file are saved,
<I>xedit</I>
is to copy the original version of that file to &lt;prefix&gt;<I>file</I>&lt;suffix&gt;
before it saves the changes. The default value for this resource is
``on,'' stating that backups should be created.
<DT id="30"><B>backupNamePrefix (</B>Class<B> BackupNamePrefix)</B>
<DD>
Specifies a string that is to be prepended to the backup filename. The
default is that no string shall be prepended.
<DT id="31"><B>backupNameSuffix (</B>Class<B> BackupNameSuffix)</B>
<DD>
Specifies a string that is to be appended to the backup filename. The
default is to use ``~'' as the suffix.
<DT id="32"><B>positionFormat (</B>Class<B> Format)</B>
<DD>
Specifies a format string used to display the cursor position. This
string uses <A HREF="/cgi-bin/man/man2html?3+printf">printf</A>(3) like notation, where
<B>%l</B>
prints the line number,
<B>%c</B>
prints the column number,
<B>%p</B>
prints the insert position offset, and
<B>%s</B>
prints the current file size. It is also allowed to specify field sizes,
with the notation
<B>%-?[0-9]+</B>
. The default format string is ``L%l'', which shows the character ``L''
followed by the line number.
<DT id="33"><B>hints (</B>Class<B> Hints)</B>
<DD>
Specifies a list of strings, separated by new lines, that will be
displayed in the bc_label window.
<DT id="34"><B>hintsInterval (</B>Class <B>Interval)</B>
<DD>
Specifies the interval in seconds, which the hint string in the bc_label
window will be changed.
<DT id="35"><B>changedBitmap (</B>Class <B>Bitmap)</B>
<DD>
Specifies the name of the Bitmap that will be displayed in the fileMenu, when
the file being edited is changed.
<DT id="36"><B>autoReplace (</B>Class <B>Replace)</B>
<DD>
This resource is useful to automatically correct common misspelling errors, but
can also be used to create simple macros. The format is
<I>{non-blanks}{blanks}[{string}]</I>. Fields are separated by newlines.
Example of use:
<BR>
<PRE>
nto not\n\
/macro some long string with \\\n newlines \\\n
</PRE>
<BR>
Will automatically replace the word <I>nto</I> by <I>not</I>, and <I>/macro</I>
by <I>some long string with
<BR>&nbsp;newlines
</I>
when you type that words.
<DT id="37"><B>ispell.dictionaries (</B>Class <B>ispell.Dictionary)</B>
<DD>
Specifies a list of dictionary names, separated by spaces, available to the
ispell program. The default value is <I>&quot;american americamed+ english&quot;</I>.
<DT id="38"><B>ispell.dictionary (</B>Class <B>ispell.Dictionary)</B>
<DD>
Specifies the default dictionary to use.
<DT id="39"><B>ispell*&lt;DICTIONARY&gt;.wordChars (</B>Class <B>ispell*Chars)</B>
<DD>
Specifies a set of characters that can be part of a legal word. The
<I>&lt;DICTIONARY&gt;</I> field is one of the dictionaries specified in the
<I>dictionaries</I> resource.
<DT id="40"><B>ispell.ispellCommand (</B>Class <B>ispell.CommandLine)</B>
<DD>
The path to the ispell program, and possibly, additional arguments. You don't
need to specify the ``-w'' option, neither the ``-a'' option.
Refer to the <I><A HREF="/cgi-bin/man/man2html?1+ispell">ispell</A></I>(1) manpage for more information on ispell options.
<DT id="41"><B>ispell.formatting (</B>Class ispell.TextFormat)
<DD>
Specifies which text formatting to use while spell checking the file. The
available formats are <I>text</I> and <I>html</I>.
<DT id="42"><B>ispell*text.skipLines (</B>Class <B>ispell*text.Skip)</B>
<DD>
Lines starting with one of the characters in this string will not be spell
checked. This resource is only used in <I>text</I> mode.
<DT id="43"><B>ispell.terseMode (</B>Class <B>ispell.Terse)</B>
<DD>
When enabled, runs ispell in terse mode, not asking user interaction for words
generated through compound formation (when using the ispell ``-C'' option), or
words generated through affix removal. The default value is False.
<DT id="44"><B>ispell.lookCommand (</B>Class <B>ispell.CommandLine)</B>
<DD>
The path to the program to search for alternate words, and possibly,
additional arguments. The default program used is <I>/usr/bin/egrep</I>.
<DT id="45"><B>ispell.wordsFile (</B>Class <B>ispell.Words)</B>
<DD>
The path to the file[s] to search for alternate words. The default file is
<I>/usr/share/dict/words</I>.
<DT id="46"><B>ispell.guessLabel (</B>Class <B>ispell.Status)</B>
<DD>
String displayed in the ispell status bar when ispell returns a guess list
of one or more words. The default value is <I>Guess</I>.
<DT id="47"><B>ispell.missLabel (</B>Class <B>ispell.Status)</B>
<DD>
String displayed in the ispell status bar when ispell returns a list of one
or more words to match a misspelled one. The default value is <I>Miss</I>.
<DT id="48"><B>ispell.rootLabel (</B>Class <B>ispell.Status)</B>
<DD>
String displayed in the ispell status bar when the word is not in the dictionary,
but it can be formed through a root one. The default value is <I>Root:</I>, and is
followed by a space and the root word.
<DT id="49"><B>ispell.noneLabel (</B>Class <B>ispell.Status)</B>
<DD>
String displayed in the ispell status bar when there is no near misses. The default
value is <I>None</I>.
<DT id="50"><B>ispell.compoundLabel (</B>Class <B>ispell.Status)</B>
<DD>
String displayed in the ispell status bar when the word being checked is formed by
concatenation of two words. The default value is <I>Compound</I>.
<DT id="51"><B>ispell.okLabel (</B>Class <B>ispell.Status)</B>
<DD>
String displayed in the ispell status bar when the checked word is in the dictionary.
This string is only displayed when using the <I>check</I> button in the xedit ispell
interface. The default value is <I>Ok</I>.
<DT id="52"><B>ispell.eofLabel (</B>Class <B>ispell.Status)</B>
<DD>
The string displayed in the ispell status bar when the end of the file is reached.
The default value is <I>End Of File</I>.
<DT id="53"><B>ispell.repeatLabel (</B>Class <B>ispell.Status)</B>
<DD>
The string displayed in the ispell status bar when two identical words are found
together in the file. The default value is <I>Repeat</I>.
<DT id="54"><B>ispell.lookLabel (</B>Class <B>ispell.Status)</B>
<DD>
The string displayed in the ispell status bar after displaying the results of
the <I>Look</I> command. If no results are found, the value of the
<I>ispell.noneLabel</I> resource is shown.
<DT id="55"><B>ispell.workingLabel (</B>Class <B>ispell.Status)</B>
<DD>
The string displayed in the ispell status bar while xedit is communicating with
ispell. The default value is <I>...</I>.
</DL>
<A NAME="lbAJ">&nbsp;</A>
<H2>WIDGETS</H2>
In order to specify resources, it is useful to know the hierarchy of
the widgets which compose <I>xedit</I>. In the notation below,
indentation indicates hierarchical structure. The widget class name
is given first, followed by the widget instance name.
<P>
<PRE>
Xedit xedit
Paned paned
Paned buttons
Command quit
Command save
Command load
Text filename
Label bc_label
Text messageWindow
Label labelWindow
Text editWindow
</PRE>
<P>
<A NAME="lbAK">&nbsp;</A>
<H2>ENVIRONMENT</H2>
<P>
<DL COMPACT>
<DT id="56"><I>DISPLAY</I>
<DD>
to get the default host and display number.
<DT id="57"><I>XENVIRONMENT</I>
<DD>
to get the name of a resource file that overrides the global resources
stored in the RESOURCE_MANAGER property.
</DL>
<A NAME="lbAL">&nbsp;</A>
<H2>FILES</H2>
<DL COMPACT>
<DT id="58"><I>/etc/X11/app-defaults/Xedit</I>
<DD>
specifies required resources
</DL>
<A NAME="lbAM">&nbsp;</A>
<H2>SEE ALSO</H2>
<I><A HREF="/cgi-bin/man/man2html?7+X">X</A></I>(7),
<I><A HREF="/cgi-bin/man/man2html?1+xrdb">xrdb</A></I>(1),
<I>Athena Widget Set</I>
<A NAME="lbAN">&nbsp;</A>
<H2>RESTRICTIONS</H2>
Xedit is not a replacement to Emacs.
<A NAME="lbAO">&nbsp;</A>
<H2>COPYRIGHT</H2>
Copyright 1988, Digital Equipment Corporation.
<BR>
Copyright 1989, X Consortium
<BR>
Copyright 1998, The XFree86 Project
<BR>
See
<I><A HREF="/cgi-bin/man/man2html?7+X">X</A></I>(7)
for a full statement of rights and permissions.
<A NAME="lbAP">&nbsp;</A>
<H2>AUTHORS</H2>
Chris D. Peterson, MIT X Consortium
<BR>
Paulo Cesar Pereira de Andrade, The XFree86 Project
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="59"><A HREF="#lbAB">NAME</A><DD>
<DT id="60"><A HREF="#lbAC">SYNTAX</A><DD>
<DT id="61"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="62"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="63"><A HREF="#lbAF">EDITING</A><DD>
<DT id="64"><A HREF="#lbAG">LINE EDIT MODE</A><DD>
<DT id="65"><A HREF="#lbAH">COMMANDS</A><DD>
<DT id="66"><A HREF="#lbAI">RESOURCES</A><DD>
<DT id="67"><A HREF="#lbAJ">WIDGETS</A><DD>
<DT id="68"><A HREF="#lbAK">ENVIRONMENT</A><DD>
<DT id="69"><A HREF="#lbAL">FILES</A><DD>
<DT id="70"><A HREF="#lbAM">SEE ALSO</A><DD>
<DT id="71"><A HREF="#lbAN">RESTRICTIONS</A><DD>
<DT id="72"><A HREF="#lbAO">COPYRIGHT</A><DD>
<DT id="73"><A HREF="#lbAP">AUTHORS</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:30 GMT, March 31, 2021
</BODY>
</HTML>