Added missing initialization (Arne Førlie).
[nedit.git] / doc / nc.pod
blobd3b68323abc480f2869cd8dedabb9530830ab98b
1 # $Id: nc.pod,v 1.6 2004/07/21 11:32:04 yooden Exp $
2 =pod
4 =head1 NAME
6 nc - Client program for NEdit text editor
8 =head1 SYNOPSYS
10 nc [B<-read>] [B<-create>] [B<-line> I<n> | B<+>I<n>] [B<-do> I<command>] 
11    [B<-ask>] [B<-noask>] [B<-svrname> I<name>] [B<-svrcmd> I<command>] 
12    [B<-lm> I<languagemode>] 
13    [B<-geometry> I<geometry> | B<-g> I<geometry>] [B<-icon> | B<-iconic>] 
14    [B<-display> I<[host]:server[.screen]>] 
15    [B<-timeout> I<seconds>] [B<-wait>] [B<-xrm> I<resourcestring>] 
16    [B<-tabbed>] [B<-untabbed>] [B<-group>] 
17    [B<-V> | B<-version>] [B<-->] [file...]
19 =head1 DESCRIPTION
21 B<nc> is the client interface to the NEdit text editor. A server can be started
22 explicitly by running NEdit in server mode:
24  nedit -server
26 If no server is running, B<nc> will start one unless configured otherwise.
27 Client/server mode is useful for integrating NEdit with software development
28 environments, mailers, and other programs; or just as a quick way to open files
29 from the shell command line without starting a new NEdit session.
31 =head1 OPTIONS
33 =over
35 =item  B<-read>
37 Open the file read-only regardless of the actual file protection.
39 =item  B<-create>
41 Don't warn about file creation when a file doesn't exist.
43 =item  B<-line> I<n>, B<+>I<n>
45 Go to line number I<n>.
47 =item  B<-do> I<command>
49 Execute an NEdit macro or action on the file following the -do argument on the
50 command line.
52 If you use this command without a filename, B<nc> would randomly choose one
53 window to focus and execute the macro in.
55 =item  B<-ask>, B<-noask>
57 Instructs B<nc> whether to automatically start a server if one is not
58 available. This overrides the X resource `nc.autoStart'.
61 =item  B<-svrname> I<name>
63 Explicitly instructs B<nc> which server to connect to, an instance of
64 L<nedit(1)> with a corresponding B<-svrname> argument.  By naming servers, you
65 can run several simultaneously, and direct files and commands specifically to
66 any one.
68 =item  B<-svrcmd> I<command>
70 The command which B<nc> uses to start an NEdit server. It is also settable via
71 the X resource `nc.serverCommand', by default, I<"nedit -server">.
73 =item  B<-lm> I<languagemode>
75 Initial language mode used for editing succeeding files.
77 =item  B<-geometry> I<geometry>, B<-g> I<geometry>
79 The initial size and/or location of editor windows. The argument geometry has
80 the form:
82   [<width>x<height>][+|-][<xoffset>[+|-]<yoffset>]
84 where `<width>' and `<height>' are the desired width and
85 height of the window, and `<xoffset>' and `<yoffset>' are the
86 distance from the edge of the screen to the window, + for top or left, - for
87 bottom or right. B<-geometry> can be specified for individual files on the
88 command line.
90 =item  B<-icon>, B<-iconic>
92 Initial window state for succeeding files.
94 =item  B<-display> I<[host]:server[.screen]>
96 The name of the X server to use. host specifies the machine, server specifies
97 the display server number, and screen specifies the screen number.  host or
98 screen can be omitted and default to the local machine, and screen 0.
100 =item  B<-timeout> I<seconds>
102 Basic time-out period (in seconds) used in communication with an NEdit server.
103 Default: 10 seconds. Also settable via the X resource `nc.timeOut'.
105 Under rare conditions (such as a slow connection), it may be necessary to
106 increase the time-out period. In most cases, the default is fine. 
108 =item B<-wait>
110 Instructs B<nc> not to return to the shell until all files given
111 are closed.
113 Normally, B<nc> returns once the files given in its command line
114 are opened by the server. When this option is given, nc returns
115 only after the last file given in this call is closed.
116 Note that this option affects all files, not only the ones
117 following this option in the command line.
120 =item  B<-xrm> I<resourcestring> 
122 Set the value of an X resource to override a default value.
124 =item  B<-tabbed>
126 Open all subsequent files in new tabs. Resets B<-group> option.
128 =item  B<-untabbed>
130 Open all subsequent files in new windows. Resets B<-group> option.
132 =item  B<-group>
134 Open all subsequent files as tabs in a new window.
137 =item  B<-V>, B<-version> 
139 Prints version and build information, to be mentioned when reporting bugs and
140 problems. 
142 =item B<-->
144 Treats all subsequent arguments as file names, even if they start with a dash.
145 This is so NEdit can access files that begin with the dash character. 
148 =back
150 =head1 ENVIRONMENT
152 =over
154 =item  DISPLAY
156 NEdit requires an X-based workstation or X-Terminal. If you have used B<telnet>
157 or B<rlogin> to access the host Unix system, set the Unix environment variable
158 for your display:
160     % setenv DISPLAY devicename:0
162 =back
164 =head1 NOTES
166 Communication between L<nc(1)> and L<nedit(1)> is through the X display. So as
167 long as X windows is set up and working properly, B<nc> will work properly
168 as well. B<nc> uses the `DISPLAY' environment variable, the machine name and
169 your user name to find the appropriate server, meaning, if you have several
170 machines sharing a common file system, B<nc> will not be able to find a server
171 that is running on a machine with a different host name, even though it may be
172 perfectly appropriate for editing a given file.
174 In typical Unix style, arguments affect the files which follow them on the
175 command line, for example:
177 =over
179 =item  incorrect:
181   nc file.c -line 25
183 =item  correct:
185   nc -line 25 file.c
187 =back
189 For more information see NEdit's online help, or I<nedit.doc> in the NEdit
190 distribution kit.
192 =head1 SEE ALSO
194 nedit(1), X(1), mwm(1), ctags(1), etags(1)
196 =head1 AUTHORS
198 NEdit was written by Mark Edel, Joy Kyriakopulos, Christopher Conrad, Jim
199 Clark, Arnulfo Zepeda-Navratil, Suresh Ravoor, Tony Balinski, Max Vohlken,
200 Yunliang Yu, Donna Reid, Arne Forlie, Eddy De Greef, Steve LoBasso, Alexander
201 Mai, Scott Tringali, Thorsten Haude, Steve Haehn, Andrew Hood, Nathaniel Gray,
202 and TK Soh.
204 =head1 COPYRIGHT
206 This program is free software; you can redistribute it and/or modify it under
207 the terms of the GNU General Public License as published by the Free Software
208 Foundation; either version 2 of the License, or (at your option) any later
209 version.
211 In addition, as a special exception to the GNU GPL, the copyright holders give
212 permission to link the code of this program with the Motif and Open Motif
213 libraries (or with modified versions of these that use the same license), and
214 distribute linked combinations including the two. You must obey the GNU General
215 Public License in all respects for all of the code used other than linking with
216 Motif/Open Motif. If you modify this file, you may extend this exception to your
217 version of the file, but you are not obligated to do so. If you do not wish to
218 do so, delete this exception statement from your version.
220 This program is distributed in the hope that it will be useful, but WITHOUT ANY
221 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
222 PARTICULAR PURPOSE.  See the GNU General Public License in the Help section
223 "Distribution Policy" for more details. 
225 =cut