⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 server.html

📁 nedit 是一款linux下的开发源码的功能强大的编辑器
💻 HTML
字号:
<HTML><HEAD><TITLE> Client/Server Mode </TITLE></HEAD><BODY><A NAME="Client/Server_Mode"></A><H2> Client/Server Mode </H2><P>NEdit can be operated on its own, or as a two-part client/serverapplication.  Client/server mode is useful for integrating NEdit withsoftware development environments, mailers, and other programs; or just as aquick way to open files from the shell command line without starting a newNEdit session.</P><P>To run NEdit in server mode, type:</P><P><PRE>      nedit -server</PRE></P><P>NEdit can also be started in server mode via the NEdit Client program(<B>nc</B>) when no servers are available.</P><P>The nc program, which is distributed along with NEdit, sends commands toan NEdit server to open files or execute editor actions. It can also beused on files that are already opened.</P><P>Listing a file on the nc command line means: Open it if it is not alreadyopen and bring the window to the front.</P><P>nc supports the following command line options:</P><P><PRE>    <B>nc</B> [<B>-read</B>] [<B>-create</B>]       [<B>-line</B> n | <B>+</B>n] [<B>-do</B> command] [<B>-lm</B> languagemode]       [<B>-svrname</B> name] [<B>-svrcmd</B> command]       [<B>-ask</B>] [<B>-noask</B>] [<B>-timeout</B> seconds]       [<B>-geometry</B> geometry | <B>-g</B> geometry] [<B>-icon</B> | <B>-iconic</B>]       [<B>-wait</B>]       [<B>-V</B> | <B>-version</B>]       [<B>-xrm</B> resourcestring] [<B>-display</B> [host]:server[.screen]]       [<B>-</B>-] [file...]</PRE></P><P><PRE><B>-read</B></PRE>Open the file read-only regardless of its actual permissions. There is noeffect if the file is already open.</P><P><PRE><B>-create</B></PRE>Don't warn about file creation when a file doesn't exist.</P><P><PRE><B>-line</B> n, <B>+</B>n</PRE>Go to line number n. This will also affect files which are already open.</P><P><PRE><B>-do</B> command</PRE>Execute an NEdit macro or action on the file following the -do argumenton the command line. Note that other files mentioned in the command lineare not affected.</P><P>If you use this command without a filename, nc would randomly choose onewindow to focus and execute the macro in.</P><P><PRE><B>-ask</B>, <B>-noask</B></PRE>Instructs nc to automatically start a server if one is not available.  Thisoverrides the X resource `nc.autoStart' (see <A HREF="resources.html#X_Resources">X Resources</A>).</P><P><PRE><B>-svrname</B> name</PRE>Explicitly instructs nc which server to connect to, an instance ofnedit(1) with a corresponding -svrname argument.  By naming servers, youcan run several simultaneously, and direct files and commandsspecifically to any one. </P><P><PRE><B>-svrcmd</B> command</PRE>The command which nc uses to start an NEdit server. It is also settablevia the X resource `nc.serverCommand' (see <A HREF="resources.html#X_Resources">X Resources</A>). Defaults to"nedit -server".</P><P><PRE><B>-lm</B> languagemode</PRE>Initial language mode used.</P><P><PRE><B>-geometry</B> geometry, <B>-g</B> geometry</PRE>The initial size and/or location of editor windows. See<A HREF="command_line.html#NEdit_Command_Line">NEdit Command Line</A> for details.</P><P><PRE><B>-icon</B>, <B>-iconic</B></PRE>Initial window state.</P><P><PRE><B>-display</B> [&#60;host&#62;]:&#60;server&#62;[.&#60;screen&#62;]</PRE>The name of the X server to use. See <A HREF="command_line.html#NEdit_Command_Line">NEdit Command Line</A> for details.</P><P><PRE><B>-timeout</B> seconds</PRE>Basic time-out period used in communication with an NEdit server.  Thedefault is 10 seconds. Also settable via the X resource `nc.timeOut'.</P><P>Under rare conditions (such as a slow connection), it may be necessary toincrease the time-out period. In most cases, the default is fine.</P><P><PRE><B>-wait</B></PRE>Instructs nc not to return to the shell until all files given are closed.</P><P>Normally, nc returns once the files given in its command line are openedby the server. When this option is given, nc returns only after the lastfile given in this call is closed.</P><P>Note that this option affects all files in the command line, not only theones following this option.</P><P>Note that nc will wait for all files given in the command line, even ifthe files were already opened.</P><P><H4>Command Line Arguments</H4></P><P>In typical Unix style, arguments affect the files which follow them on thecommand line, for example:</P><P><PRE>      incorrect:   nc file.c -line 25      correct:     nc -line 25 file.c</PRE></P><P>-read, -create, and -line affect all of the files which follow them on thecommand line.</P><P>The -do macro is executed only once, on the next file on the line.  -dowithout a file following it on the command line, executes the macro on thefirst available window (presumably when you give a -do command without acorresponding file or window, you intend it to do something independent ofthe window in which it happens to execute).</P><P>The -wait option affects all files named in the command line.</P><P><H4>Multiple Servers</H4></P><P>Sometimes it is useful to have more than one NEdit server running, forexample to keep mail and programming work separate.  The option, -svrname, toboth nedit and nc, allows you to start, and communicate with, separate namedservers.  A named server responds only to requests with the corresponding-svrname argument.  If you use ClearCase and are within a ClearCase view, theserver name will default to the name of the view (based on the value of theCLEARCASE_ROOT environment variable).</P><P><H4>Communication</H4></P><P>Communication between nc and nedit is done through the X display. So as longas the X Window System is set up and working properly, nc will work properlyas well. nc uses the DISPLAY environment variable, the machine name and youruser name to find the appropriate server, meaning, if you have severalmachines sharing a common file system, nc will not be able to find a serverthat is running on a machine with a different host name, even though it maybe perfectly appropriate for editing a given file.</P><P>The command which nc uses to start an nedit server is settable via the Xresource nc.serverCommand, by default, "nedit -server".<P><HR></P><P></P></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -