RE: option "-server" - what does it bring?
Tony Balinski <[email protected]>
| Newsgroups | gmane.editors.nedit.user |
|---|---|
| Message-ID | <[email protected]> |
Quoting "Ravenhall, Stewart" <[email protected]>: > > I wonder, what is the effect of the '-server' option to NEdit. > > "nc" can then connect to the "nedit -server" instance, so you can share the > window via tabs rather than launch a separate window. Actually, if nedit is in your $PATH, use "nc -noask files..." instead of nedit itself (using an alias perhaps, or a shell function). This will start nedit in server mode itself, then get nedit to open up the files. If you still have this nedit sessio open, running "nc -noask otherfiles..." will open the others using the same nedit - all the files will be available in the same window list. If you use tabbed windows, they'll probably all end up together, each with its own tab. (You can detach them, or set a nedit preference for separate windows if you prefer.) Generally using nedit in server mode with nc ("nedit client") gives a much smoother experience and stops the problem of perhaps opening the same file twice in separate nedit instances, and getting confused about which window was used to change something. If you just have the one nedit, in server mode, "reopening" a file with nc will just give focus to that file's window/tab, and not change the effect of any edits you've done. It's also a better hook for nedit usage with other tools. File managers can use it; I've also added custom commands to gdb which will (re)open source files and go to the next line to be executed while stepping through a program to debug it, for example, by having gdb invoke nc each time. The nedit process stops when the last nedit window is closed. If you need multiple nedit processes to respond to nc, you can provide a "-svrname server-name" argument to nc, telling it which nedit instance to use. On some machines there's already a nc program, doing something else completely. For this reason, nedit's nc program sometimes gets renamed to neditc to avoid conflict. I just make sure nedit's nc is found earlier in my $PATH :-). Hope this helps. Tony -- NEdit Discuss mailing list - [email protected] http://www.nedit.org/mailman/listinfo/discuss