NC(1)

πŸ“¦
version 5.7 Β· 5 versions
, in debian bookworm, ubuntu jammy

πŸ’– NC(1) β€” the nedit-nc glow-up πŸ’–

okay bestie, welcome to NC(1), straight out of the NEdit documentation ✨ this is the lil client-side bestie that talks to your NEdit server, and by the end of this page you're gonna understand it so well, no cap 🫢


🌸 NAME 🌸

nedit-nc β€” the client program for the NEdit text editor πŸ’… it's the friend that knocks on the door so the editor can actually open your stuff.


✨ SYNOPSYS ✨

(yeah it's spelled like that, we don't ask questions, we just vibe)

nedit-nc [-read] [-create] [-line n | +n] [-do command]
         [-ask] [-noask] [-svrname name] [-svrcmd command]
         [-lm languagemode]
         [-geometry geometry | -g geometry] [-icon | -iconic]
         [-display [host]:server[.screen]]
         [-timeout seconds] [-wait] [-xrm resourcestring]
         [-tabbed] [-untabbed] [-group]
         [-V | -version] [-h | -help] [--] [file...]

look at all those options. she's got range πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So nedit-nc is the client interface to the NEdit text editor. Think of it as the messenger girl β€” she doesn't edit anything herself, she just delivers your files and commands to the server πŸŽ€

You can start a server on purpose by running NEdit in server mode, like this:

nedit -server

And if literally no server is running? nedit-nc will start one for you, unless it's been configured to not do that. She's proactive like that πŸ’β€β™€οΈ

Why is client/server mode such a slay? Because it lets you integrate NEdit with software development environments, mailers, and other programs β€” OR it's just the quickest lil way to open files from your shell command line without spawning a whole new NEdit session every single time. Efficiency queen πŸ‘‘


πŸ‘‘ OPTIONS πŸ‘‘

Here comes the main event, bestie. Every single one, in order, no skipping πŸ™ˆ

  • -read β€” opens the file read-only, no matter what the actual file protection says. She said "look but don't touch" βœ‹
  • -create β€” don't warn about file creation when the file doesn't exist. No drama, just silence 🌸
  • -line n, +n β€” jump straight to line number n. Main character energy, straight to the point πŸ“
  • -do command β€” runs an NEdit macro or action on the file that comes after the -do argument on the command line.
real talk: if you use this command without a filename, nedit-nc would randomly choose one window to focus and execute the macro in. Random. Chaotic. Iconic. πŸ’€
  • -ask, -noask β€” tells nedit-nc whether to automatically start a server when one isn't available. This overrides the X resource nc.autoStart πŸŽ€
  • -svrname name β€” explicitly tells nedit-nc which server to connect to β€” specifically an instance of nedit(1) that was started with a matching -svrname argument. By naming your servers you can run several at once and direct files and commands at exactly the one you want. It's giving "everyone gets their own group chat" πŸ’…
  • -svrcmd command β€” the command nedit-nc uses to start an NEdit server. Also settable via the X resource nc.serverCommand, and by default it's "nedit -server" πŸ”₯
  • -lm languagemode β€” the initial language mode used for editing succeeding files. Set the vibe before you even start ✨
  • -geometry geometry, -g geometry β€” the initial size and/or location of editor windows. The argument geometry has this form:
[<width>x<height>][+|-][<xoffset>[+|-]<yoffset>]

where <width> and <height> are the desired width and height of the window, and <xoffset> and <yoffset> are the distance from the edge of the screen to the window β€” + for top or left, - for bottom or right. And yes, -geometry can be specified for individual files on the command line πŸŽ€

  • -icon, -iconic β€” initial window state for succeeding files. She starts minimized, she contains multitudes πŸ¦‹
  • -display [host]:server[.screen] β€” the name of the X server to use. host is the machine, server is the display server number, and screen is the screen number. You can omit host or screen and they default to the local machine and screen 0 πŸ’œ
  • -timeout seconds β€” the basic time-out period (in seconds) used when communicating with an NEdit server. Default: 10 seconds. Also settable via the X resource nc.timeOut.
under rare conditions (like a slow connection) you might need to bump the time-out period up. In most cases though, the default is fine, don't overthink it bestie 😌
  • -wait β€” tells nedit-nc not to return to the shell until all the given files are closed.

Normally nedit-nc comes back as soon as the files from its command line are opened by the server. With this option, she only returns after the last file given in this call is closed. And heads up: this option affects all files, not just the ones that come after it on the command line. She's committed to the whole roster πŸ’–

  • -xrm resourcestring β€” sets the value of an X resource, overriding a default value ⭐
  • -tabbed β€” opens all subsequent files in new tabs. Also resets the -group option πŸ”„
  • -untabbed β€” opens all subsequent files in new windows. Also resets the -group option πŸ”„
  • -group β€” opens all subsequent files as tabs in a new window πŸŽ€
  • -V, -version β€” prints version and build information. Mention this when you're reporting bugs and problems, it's literally the polite thing to do πŸ™
  • -h, -help β€” prints the command line help and then exits. Quick lil hello-goodbye πŸ‘‹
  • -- β€” treats all subsequent arguments as file names, even if they start with a dash. This exists so NEdit can access files that begin with the dash character. Protection for the chaotic filenames πŸ›‘οΈ

🌈 ENVIRONMENT 🌈

  • DISPLAY β€” NEdit needs an X-based workstation or X-Terminal. If you've used telnet or rlogin to get onto the host Unix system, set the Unix environment variable for your display:
% setenv DISPLAY devicename:0

πŸ’€ NOTES πŸ’€

Communication between nedit-nc(1) and nedit(1) goes through the X display. So as long as X windows is set up and working properly, nedit-nc will work properly too πŸ’…

nedit-nc uses the DISPLAY environment variable, the machine name, and your user name to find the appropriate server. Which means: if you have several machines sharing a common file system, nedit-nc will not be able to find a server that's running on a machine with a different host name β€” even if that server would be perfectly appropriate for editing a given file. Sad but true 😭

And in typical Unix style, arguments affect the files which follow them on the command line. For example:

incorrect:

nedit-nc file.c -line 25

correct:

nedit-nc -line 25 file.c

Order matters, bestie. Put the flag first or it simply won't hit 🎯

For more info, check NEdit's online help, or nedit.doc in the NEdit distribution kit πŸ“š


🫢 SEE ALSO 🫢

nedit(1), X(1), mwm(1), ctags(1), etags(1)


⭐ AUTHORS ⭐

NEdit was written by Mark Edel, Joy Kyriakopulos, Christopher Conrad, Jim Clark, Arnulfo Zepeda-Navratil, Suresh Ravoor, Tony Balinski, Max Vohlken, Yunliang Yu, Donna Reid, Arne Forlie, Eddy De Greef, Steve LoBasso, Alexander Mai, Scott Tringali, Thorsten Haude, Steve Haehn, Andrew Hood, Nathaniel Gray, and TK Soh. Absolute legends, all of them πŸ‘‘


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version πŸ’œ

In addition, as a special exception to the GNU GPL, the copyright holders give permission to link the code of this program with the Motif and Open Motif libraries (or with modified versions of these that use the same license), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than linking with Motif/Open Motif. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License in the Help section "Distribution Policy" for more details.

fr fr, read the license. it's giving "legally required to be here" but it's also giving "actually protects you" πŸ’–

and that's the whole page, bestie πŸ’… this lil rewrite came to you from NEdit released by Debian (1:5.7-3), dated 2020-09-12 β€” and yes, she's still NC(1), always and forever πŸ¦‹βœ¨

πŸ“¦ where this page comes from