NAME

xedit - simple text editor for X

SYNTAX

xedit [ -toolkitoption ... ] [ filename ... ]

DESCRIPTION

Xedit provides a window consisting of the following four areas:
Commands Section A set of commands that allow you to exit _x_e_d_i_t, save the file, or
load a new file into the edit window.
Message Window Displays _x_e_d_i_t messages. In addition, this window can be also used as
a scratch pad.
Filename Display Displays the name of the file currently being edited, and whether this file
is _R_e_a_d_-_W_r_i_t_e or _R_e_a_d _O_n_l_y.
Edit Window Displays the text of the file that you are editing or creating.

OPTIONS

Xedit accepts all of the standard X Toolkit command line options (see X(7)). The order of the command line options is not important.
filename
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, xedit lets you load files or create new files after it has started up.

EDITING

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.

The following keystroke combinations are defined:


Ctrl-a    Beginning Of Line   Meta-b         Backward Word
Ctrl-b    Backward Character  Meta-f         Forward Word
Ctrl-d    Delete Next Character              Meta-iInsert File
Ctrl-e    End Of Line         Meta-k         Kill To End Of Paragraph
Ctrl-f    Forward Character   Meta-q         Form Paragraph
Ctrl-g    Keyboard Reset      Meta-v         Previous Page
Ctrl-h    Delete Previous Character          Meta-yInsert Current Selection
Ctrl-j    Newline And Indent  Meta-z         Scroll One Line Down
Ctrl-k    Kill To End Of Line Meta-d         Delete Next Word
Ctrl-l    Redraw Display      Meta-D         Kill Word
Ctrl-m    Newline             Meta-h         Delete Previous Word
Ctrl-n    Next Line           Meta-H         Backward Kill Word
Ctrl-o    Newline And Backup  Meta-<         Beginning Of File
Ctrl-p    Previous Line       Meta->         End Of File
Ctrl-r    Search/Replace Backward            Meta-]Forward Paragraph
Ctrl-s    Search/Replace Forward             Meta-[Backward Paragraph
Ctrl-t    Transpose Characters
Ctrl-u [_n_u_m_b_e_r]               Multiply by 4 or _n_u_m_b_e_rMeta-DeleteDelete Previous Word
Ctrl-v    Next Page           Meta-Shift DeleteKill Previous Word
Ctrl-w    Kill Selection      Meta-Backspace Delete Previous Word
Ctrl-y    Unkill              Meta-Shift BackspaceKill Previous Word
Ctrl-z    Scroll One Line Up  Meta-z         Scroll One Line Down
Ctrl-_    Undo
Escape    Line Edit Mode


In addition, the pointer may be used to cut and paste text: Button 1 Down Start Selection Button 1 MotionAdjust Selection Button 1 Up End Selection (cut)

Button 2 Down Insert Current Selection (paste)

Button 3 Down Extend Current Selection Button 3 MotionAdjust Selection Button 3 Up End Selection (cut)

LINE EDIT MODE

Line edit mode enables several shortcut commands for searching and replacing text in a xedit buffer. Line edit mode commands have the format:


     

[_l_i_n_e_-_n_u_m_b_e_r[,_l_i_n_e_-_n_u_m_b_e_r]]_c_o_m_m_a_n_d[_p_a_r_a_m_e_t_e_r_s]

Line number may be specified as:

.
The current text line.
$
The last line of the file.
number
The literal line _n_u_m_b_e_r.
- or ^
The previous line. Equivalent to _-_1.
-number or ^number
The current line minus _n_u_m_b_e_r.
+
The next line. Equivalent to _+_1.
+number
The current line plus _n_u_m_b_e_r.
, or %
From the first to the last line. Equivalent to _1_,_$.
;
From the current to the last line. Equivalent to _._,_$.

Command may be specified as:

s
Substitute text in the specified lines.
/re/
Search forward for the regular expression pattern _r_e.
?re?
Search backward for the regular expression pattern _r_e.

Parameters may be specified as:

/re/
Works as a parameter to _i or as a command.
/re/text/
Search forward for _r_e and substitute by _t_e_x_t.

Options may follow or be parameters, known values are:

i
Case insensitive search.
g
_G_l_o_b_a_l match when replacing text. Unless specified, only the nth, that defaults to 1, match will be replaced.
c
_C_o_n_f_i_r_m before replacing text.
number
Replace only the occurrence referenced by _n_u_m_b_e_r.

Commands accept some variations, examples:

     /pattern/i
     i/pattern/
     i/pattern
Search forward for _p_a_t_t_e_r_n.


     

,sc/pattern/text ,sc/pattern/text/ ,s/pattern/text/c Search the entire buffer and ask confirmation to replace _p_a_t_t_e_r_n with _t_e_x_t.


     

,s/pattern/text/number Replace the match _n_u_m_b_e_r in the text line. If not specified, defaults to the first occurrence.

When searching for text, type to go to the next match. When interactively replacing text, type _y or _Y to accept the change, and _n or _N to ignore it and go to the next match.

COMMANDS

Quit Quits the current editing session. If any changes have not been saved,
xedit displays a warning message, allowing the user to save them.
Save If file backups are enabled (see RESOURCES, below)
xedit stores a copy of the original, unedited file in _f_i_l_e, then overwrites the _f_i_l_e with the contents of the edit window. The filename is retrieved from the Text widget directly to the right of the _L_o_a_d button.
Load Loads the file named in the text widget immediately to the right
of the this button and displays it in the Edit window.

RESOURCES

For _x_e_d_i_t the available resources are:
tagsName (_C_l_a_s_s TTaaggssNNaammee))<> <> SSppeecciiffiieess tthhee nnaammee ooff tthhee ttaaggss ffiillee ttoo sseeaarrcchh wwhheenn llooaaddiinngg aa nneeww ffiillee.. DDeeffaauulltt vvaalluuee iiss _t_a_g_s.. <> <>llooaaddTTaaggss ((_C_l_a_s_s LLooaaddTTaaggss))<> <> BBoooolleeaann vvaalluuee ttoo eennaabbllee oorr ddiissaabblliinngg sseeaarrcchhiinngg ffoorr ttaaggss ffiilleess.. DDeeffaauulltt iiss _T_r_u_e.. <> <>eennaabblleeBBaacckkuuppss ((_C_l_a_s_s EEnnaabblleeBBaacckkuuppss))<> <> SSppeecciiffiieess tthhaatt,, wwhheenn eeddiittss mmaaddee ttoo aann eexxiissttiinngg ffiillee aarree ssaavveedd,, <>xxeeddiitt<> iiss ttoo ccooppyy tthhee oorriiggiinnaall vveerrssiioonn ooff tthhaatt ffiillee ttoo <>_f_i_l_e<> bbeeffoorree iitt ssaavveess tthhee cchhaannggeess.. TThhee ddeeffaauulltt vvaalluuee ffoorr tthhiiss rreessoouurrccee iiss ````oonn,,'''' ssttaattiinngg tthhaatt bbaacckkuuppss sshhoouulldd bbee ccrreeaatteedd.. <> <>bbaacckkuuppNNaammeePPrreeffiixx ((_C_l_a_s_s BBaacckkuuppNNaammeePPrreeffiixx))<> <> SSppeecciiffiieess aa ssttrriinngg tthhaatt iiss ttoo bbee pprreeppeennddeedd ttoo tthhee bbaacckkuupp ffiilleennaammee.. TThhee ddeeffaauulltt iiss tthhaatt nnoo ssttrriinngg sshhaallll bbee pprreeppeennddeedd.. <> <>bbaacckkuuppNNaammeeSSuuffffiixx ((_C_l_a_s_s BBaacckkuuppNNaammeeSSuuffffiixx))<> <> SSppeecciiffiieess aa ssttrriinngg tthhaatt iiss ttoo bbee aappppeennddeedd ttoo tthhee bbaacckkuupp ffiilleennaammee.. TThhee ddeeffaauulltt iiss ttoo uussee ````~~'''' aass tthhee ssuuffffiixx.. <> <>ppoossiittiioonnFFoorrmmaatt ((_C_l_a_s_s FFoorrmmaatt))<> <> SSppeecciiffiieess aa ffoorrmmaatt ssttrriinngg uusseedd ttoo ddiissppllaayy tthhee ccuurrssoorr ppoossiittiioonn.. TThhiiss ssttrriinngg uusseess pprriinnttff((33)) lliikkee nnoottaattiioonn,, wwhheerree <>%%ll<> pprriinnttss tthhee lliinnee nnuummbbeerr,, <>%%cc<> pprriinnttss tthhee ccoolluummnn nnuummbbeerr,, <>%%pp<> pprriinnttss tthhee iinnsseerrtt ppoossiittiioonn ooffffsseett,, aanndd <>%%ss<> pprriinnttss tthhee ccuurrrreenntt ffiillee ssiizzee.. IItt iiss aallssoo aalllloowweedd ttoo ssppeecciiffyy ffiieelldd ssiizzeess,, wwiitthh tthhee nnoottaattiioonn <>%%--??[[00--99]]++<> .. TThhee ddeeffaauulltt ffoorrmmaatt ssttrriinngg iiss ````LL%%ll'''',, wwhhiicchh sshhoowwss tthhee cchhaarraacctteerr ````LL'''' ffoolllloowweedd bbyy tthhee lliinnee nnuummbbeerr.. <> <>hhiinnttss ((_C_l_a_s_s HHiinnttss))<> <> SSppeecciiffiieess aa lliisstt ooff ssttrriinnggss,, sseeppaarraatteedd bbyy nneeww lliinneess,, tthhaatt wwiillll bbee ddiissppllaayyeedd iinn tthhee bbcc__llaabbeell wwiinnddooww.. <> <>hhiinnttssIInntteerrvvaall ((_C_l_a_s_s IInntteerrvvaall))<> <> SSppeecciiffiieess tthhee iinntteerrvvaall iinn sseeccoonnddss,, wwhhiicchh tthhee hhiinntt ssttrriinngg iinn tthhee bbcc__llaabbeell wwiinnddooww wwiillll bbee cchhaannggeedd.. <> <>cchhaannggeeddBBiittmmaapp ((_C_l_a_s_s BBiittmmaapp))<> <> SSppeecciiffiieess tthhee nnaammee ooff tthhee BBiittmmaapp tthhaatt wwiillll bbee ddiissppllaayyeedd iinn tthhee ffiilleeMMeennuu,, wwhheenn tthhee ffiillee bbeeiinngg eeddiitteedd iiss cchhaannggeedd.. <> <>aauuttooRReeppllaaccee ((_C_l_a_s_s RReeppllaaccee))<> <> TThhiiss rreessoouurrccee iiss uusseeffuull ttoo aauuttoommaattiiccaallllyy ccoorrrreecctt ccoommmmoonn mmiissssppeelllliinngg eerrrroorrss,, bbuutt ccaann aallssoo bbee uusseedd ttoo ccrreeaattee ssiimmppllee mmaaccrrooss.. TThhee ffoorrmmaatt iiss _{_n_o_n_-_b_l_a_n_k_s_}_{_b_l_a_n_k_s_}_[_{_s_t_r_i_n_g_}_].. FFiieellddss aarree sseeppaarreetteedd bbyy nneewwlliinneess.. EExxaammppllee ooff uussee:: <> <> <> <> nnttoo nnoott\\nn\\ //mmaaccrroo ssoommee lloonngg ssttrriinngg wwiitthh \\\\\\nn nneewwlliinneess \\\\\\nn <> <> <> WWiillll aauuttoommaattiiccaallllyy rreeppllaaccee tthhee wwoorrdd _n_t_o bbyy _n_o_t,, aanndd _/_m_a_c_r_o bbyy _s_o_m_e _l_o_n_g _s_t_r_i_n_g _w_i_t_h _n_e_w_l_i_n_e_s wwhheenn yyoouu ttyyppee tthhaatt wwoorrddss.. <> <>iissppeellll..ddiiccttiioonnaarriieess ((_C_l_a_s_s iissppeellll..DDiiccttiioonnaarryy))<> <> SSppeecciiffiieess aa lliisstt ooff ddiiccttiioonnaarryy nnaammeess,, sseeppaarreetteedd bbyy ssppaacceess,, aavvaaiillaabbllee ttoo tthhee iissppeellll pprrooggrraamm.. TThhee ddeeffaauulltt vvaalluuee iiss _"_a_m_e_r_i_c_a_n _a_m_e_r_i_c_a_m_e_d_+ _e_n_g_l_i_s_h_".. <> <>iissppeellll..ddiiccttiioonnaarryy ((_C_l_a_s_s iissppeellll..DDiiccttiioonnaarryy))<> <> SSppeecciiffiieess tthhee ddeeffaauulltt ddiiccttiioonnaarryy ttoo uussee.. <> <>iissppeellll**<>..wwoorrddCChhaarrss ((_C_l_a_s_s iissppeellll**CChhaarrss))<> <> SSppeecciiffiieess aa sseett ooff cchhaarraacctteerrss tthhaatt ccaann bbee ppaarrtt ooff aa lleeggaall wwoorrdd.. TThhee _<_D_I_C_T_I_O_N_A_R_Y_> ffiieelldd iiss oonnee ooff tthhee ddiiccttiioonnaarriieess ssppeecciiffiieedd iinn tthhee _d_i_c_t_i_o_n_a_r_i_e_s rreessoouurrccee.. <> <>iissppeellll..iissppeellllCCoommmmaanndd ((_C_l_a_s_s iissppeellll..CCoommmmaannddLLiinnee))<> <> TThhee ppaatthh ttoo tthhee iissppeellll pprrooggrraamm,, aanndd ppoossssiibbllyy,, aaddddiittiioonnaall aarrgguummeennttss.. YYoouu ddoonn''tt nneeeedd ttoo ssppeecciiffyy tthhee ````--ww'''' ooppttiioonn,, nneeiitthheerr tthhee ````--aa'''' ooppttiioonn.. RReeffeerr ttoo tthhee _i_s_p_e_l_l((11)) mmaannppaaggee ffoorr mmoorree iinnffoorrmmaattiioonn oonn iissppeellll ooppttiioonnss.. <> <>iissppeellll..ffoorrmmaattttiinngg ((_C_l_a_s_s iissppeellll..TTeexxttFFoorrmmaatt))<> <> SSppeecciiffiieess wwhhiicchh tteexxtt ffoorrmmaattttiinngg ttoo uussee wwhhiillee ssppeellll cchheecckkiinngg tthhee ffiillee.. TThhee aavvaaiillaabbllee ffoorrmmaattss aarree _t_e_x_t aanndd _h_t_m_l.. <> <>iissppeellll**tteexxtt..sskkiippLLiinneess ((_C_l_a_s_s iissppeellll**tteexxtt..SSkkiipp))<> <> LLiinneess ssttaarrttiinngg wwiitthh oonnee ooff tthhee cchhaarraacctteerrss iinn tthhiiss ssttrriinngg wwiillll nnoott bbee ssppeellll cchheecckkeedd.. TThhiiss rreessoouurrccee iiss oonnllyy uusseedd iinn _t_e_x_t mmooddee.. <> <>iissppeellll..tteerrsseeMMooddee ((_C_l_a_s_s iissppeellll..TTeerrssee))<> <> WWhheenn eennaabblleedd,, rruunnss iissppeellll iinn tteerrssee mmooddee,, nnoott aasskkiinngg uusseerr iinntteerraaccttiioonn ffoorr wwoorrddss ggeenneerraatteedd tthhrroouugghh ccoommppoouunndd ffoorrmmaattiioonn ((wwhheenn uussiinngg tthhee iissppeellll ````--CC'''' ooppttiioonn)),, oorr wwoorrddss ggeenneerraatteedd tthhrroouugghh aaffffiixx rreemmoovvaall.. TThhee ddeeffaauulltt vvaalluuee iiss FFaallssee.. <> <>iissppeellll..llooookkCCoommmmaanndd ((_C_l_a_s_s iissppeellll..CCoommmmaannddLLiinnee))<> <> TThhee ppaatthh ttoo tthhee pprrooggrraamm ttoo sseeaarrcchh ffoorr aalltteerrnnaattee wwoorrddss,, aanndd ppoossssiibbllyy,, aaddddiittiioonnaall aarrgguummeennttss.. TThhee ddeeffaauulltt pprrooggrraamm uusseedd iiss _/_u_s_r_/_b_i_n_/_e_g_r_e_p.. <> <>iissppeellll..wwoorrddssFFiillee ((_C_l_a_s_s iissppeellll..WWoorrddss))<> <> TThhee ppaatthh ttoo tthhee ffiillee[[ss]] ttoo sseeaarrcchh ffoorr aalltteerrnnaattee wwoorrddss.. TThhee ddeeffaauulltt ffiillee iiss _/_u_s_r_/_s_h_a_r_e_/_d_i_c_t_/_w_o_r_d_s.. <> <>iissppeellll..gguueessssLLaabbeell ((_C_l_a_s_s iissppeellll..SSttaattuuss))<> <> SSttrriinngg ddiissppllaayyeedd iinn tthhee iissppeellll ssttaattuuss bbaarr wwhheenn iissppeellll rreettuurrnnss aa gguueessss lliisstt ooff oonnee oorr mmoorree wwoorrddss.. TThhee ddeeffaauulltt vvaalluuee iiss _G_u_e_s_s.. <> <>iissppeellll..mmiissssLLaabbeell ((_C_l_a_s_s iissppeellll..SSttaattuuss))<> <> SSttrriinngg ddiissppllaayyeedd iinn tthhee iissppeellll ssttaattuuss bbaarr wwhheenn iissppeellll rreettuurrnnss aa lliisstt ooff oonnee oorr mmoorree wwoorrddss ttoo mmaattcchh aa mmiissssppeelllleedd oonnee.. TThhee ddeeffaauulltt vvaalluuee iiss _M_i_s_s.. <> <>iissppeellll..rroooottLLaabbeell ((_C_l_a_s_s iissppeellll..SSttaattuuss))<> <> SSttrriinngg ddiissppllaayyeedd iinn tthhee iissppeellll ssttaattuuss bbaarr wwhheenn tthhee wwoorrdd iiss nnoott iinn tthhee ddiiccttiioonnaarryy,, bbuutt iitt ccaann bbee ffoorrmmeedd tthhrroouugghh aa rroooott oonnee.. TThhee ddeeffaauulltt vvaalluuee iiss _R_o_o_t_:,, aanndd iiss ffoolllloowweedd bbyy aa ssppaaccee aanndd tthhee rroooott wwoorrdd.. <> <>iissppeellll..nnoonneeLLaabbeell ((_C_l_a_s_s iissppeellll..SSttaattuuss))<> <> SSttrriinngg ddiissppllaayyeedd iinn tthhee iissppeellll ssttaattuuss bbaarr wwhheenn tthheerree iiss nnoo nneeaarr mmiisssseess.. TThhee ddeeffaauulltt vvaalluuee iiss _N_o_n_e.. <> <>iissppeellll..ccoommppoouunnddLLaabbeell ((_C_l_a_s_s iissppeellll..SSttaattuuss))<> <> SSttrriinngg ddiissppllaayyeedd iinn tthhee iissppeellll ssttaattuuss bbaarr wwhheenn tthhee wwoorrdd bbeeiinngg cchheecckkeedd iiss ffoorrmmeedd bbyy ccoonnccaatteennaattiioonn ooff ttwwoo wwoorrddss.. TThhee ddeeffaauulltt vvaalluuee iiss _C_o_m_p_o_u_n_d.. <> <>iissppeellll..ookkLLaabbeell ((_C_l_a_s_s iissppeellll..SSttaattuuss))<> <> SSttrriinngg ddiissppllaayyeedd iinn tthhee iissppeellll ssttaattuuss bbaarr wwhheenn tthhee cchheecckkeedd wwoorrdd iiss iinn tthhee ddiiccttiioonnaarryy.. TThhiiss ssttrriinngg iiss oonnllyy ddiissppllaayyeedd wwhheenn uussiinngg tthhee _c_h_e_c_k bbuuttttoonn iinn tthhee xxeeddiitt iissppeellll iinntteerrffaaccee.. TThhee ddeeffaauulltt vvaalluuee iiss _O_k.. <> <>iissppeellll..eeooffLLaabbeell ((_C_l_a_s_s iissppeellll..SSttaattuuss))<> <> TThhee ssttrriinngg ddiissppllaayyeedd iinn tthhee iissppeellll ssttaattuuss bbaarr wwhheenn tthhee eenndd ooff tthhee ffiillee iiss rreeaacchheedd.. TThhee ddeeffaauulltt vvaalluuee iiss _E_n_d _O_f _F_i_l_e.. <> <>iissppeellll..rreeppeeaattLLaabbeell ((_C_l_a_s_s iissppeellll..SSttaattuuss))<> <> TThhee ssttrriinngg ddiissppllaayyeedd iinn tthhee iissppeellll ssttaattuuss bbaarr wwhheenn ttwwoo iiddeennttiiccaall wwoorrddss aarree ffoouunndd ttooggeetthheerr iinn tthhee ffiillee.. TThhee ddeeffaauulltt vvaalluuee iiss _R_e_p_e_a_t.. <> <>iissppeellll..llooookkLLaabbeell ((_C_l_a_s_s iissppeellll..SSttaattuuss))<> <> TThhee ssttrriinngg ddiissppllaayyeedd iinn tthhee iissppeellll ssttaattuuss bbaarr aafftteerr ddiissppllaayyiinngg tthhee rreessuullttss ooff tthhee _L_o_o_k ccoommmmaanndd.. IIff nnoo rreessuullttss aarree ffoouunndd,, tthhee vvaalluuee ooff tthhee _i_s_p_e_l_l_._n_o_n_e_L_a_b_e_l rreessoouurrccee iiss sshhoowwnn.. <> <>iissppeellll..wwoorrkkiinnggLLaabbeell ((_C_l_a_s_s iissppeellll..SSttaattuuss))<> <> TThhee ssttrriinngg ddiissppllaayyeedd iinn tthhee iissppeellll ssttaattuuss bbaarr wwhhiillee xxeeddiitt iiss ccoommmmuunniiccaattiinngg wwiitthh iissppeellll.. TThhee ddeeffaauulltt vvaalluuee iiss _._._... <> <> WWIIDDGGEETTSS <> IInn oorrddeerr ttoo ssppeecciiffyy rreessoouurrcceess,, iitt iiss uusseeffuull ttoo kknnooww tthhee hhiieerraarrcchhyy ooff tthhee wwiiddggeettss wwhhiicchh ccoommppoossee _x_e_d_i_t. In the notation below, indentation indicates hierarchical structure. The widget class name is given first, followed by the widget instance name.


Xedit  xedit
     Paned  paned
          Paned  buttons
               Command  quit
               Command  save
               Command  load
               Text     filename
          Label  bc_label
          Text   messageWindow
          Label  labelWindow
          Text   editWindow


ENVIRONMENT

DISPLAY
to get the default host and display number.
XENVIRONMENT
to get the name of a resource file that overrides the global resources stored in the RESOURCE_MANAGER property.

FILES

/usr/X11R7/lib/X11/app-defaults/Xedit
specifies required resources

SEE ALSO

X(7) xrdb(1) Athena Widget Set

RESTRICTIONS

Xedit is not a replacement to Emacs. Copyright 1988, Digital Equipment Corporation.
Copyright 1989, X Consortium
Copyright 1998, The XFree86 Project
See X(7) for a full statement of rights and permissions.

AUTHORS

Chris D. Peterson, MIT X Consortium
Paulo Cesar Pereira de Andrade, The XFree86 Project