1820390 Members
3854 Online
109623 Solutions
New Discussion юеВ

nedit as default editor

 
SOLVED
Go to solution
subhashni
Regular Advisor

nedit as default editor

Hi ,

I would like to setup nedit as a default editor.Thanks in advance.

Thanks
unix4me
4 REPLIES 4
Hai Nguyen_1
Honored Contributor

Re: nedit as default editor

Subhashni,

There is an environmental variable named EDITOR. Set it in your suitable profile to make it default. For example, if your default shell is sh or ksh, add the following line to your .profile:

export EDITOR=nedit

Hai
Ceesjan van Hattum
Esteemed Contributor

Re: nedit as default editor

Look in your .profile for a line like:
setenv EDITOR vi
or
export EDITOR=vi
or anything like it.
This 'vi' you can change to 'nedit' if you like.
To change it for all new
users to be, also put it into /etc/skel/.profile
This profile is used when a new user is added.
To keep yourself popular, leave the choice to the users theirselves.

Regards,
Ceesjan
Jeff Schussele
Honored Contributor
Solution

Re: nedit as default editor

Well, as this is an X-windows based editor and essentially a 3rd party application, it would be started from the command line after you've downloaded the binaries from:
http://www.nedit.org/ftp/v5_3/executables/
You'll ucompress it, untar it (Note: It's a relative tarball - so be in the location where you wish it to reside. I'd suggest /usr/local/bin). It'll create a dir called nedit-5.3.
Then just make sure you path thru this dir (/path/to/nedit-5.3 & all you have to do is type nedit or nc (nedit client).

Regards,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Gregory Fruth
Esteemed Contributor

Re: nedit as default editor

The EDITOR variable only works for command line tools
like elm, more, etc. If you want to set it up so that Nedit
is the default editor in the CDE front panel and in the
CDE file manager, you need to customize you CDE
settings. To do so, copy these files:

/usr/dt/appconfig/types/C/user-prefs.dt
/usr/dt/appconfig/types/C/dtwm.fp

to the directory /etc/dt/appconfig/types/C (if
making the change for all users) or to the
directory ~/.dt/types (if making the change
just for yourself). (The "~" refers to your home
directory. Also, if your locale (i.e. the $LANG
environment variable) setting is not "C", replace
"C" with your locale.)

Then modify the file user-prefs.dt so that this line:
MAP_ACTION Dtpad
becomes:
MAP_ACTION Nedit

Then modify the file dtwm.fp so that the lines:
LABEL Text Editor
PUSH_ACTION Dtpad
DROP_ACTION Dtpad
become:
LABEL Nedit Text Editor
PUSH_ACTION Nedit
DROP_ACTION Nedit

Finally, create a file called nedit.dt in the same
directory that you placed the above files in.
It should contain the following:

ACTION Nedit
{
LABEL Nedit Text Editor
ICON Dtpenpd
TYPE COMMAND
WINDOW_TYPE NO_STDIO
EXEC_STRING nedit %Args%
}

Now log out and log back in, and Nedit should
your default CDE text editor.