installing nedit as default text editor to unraid


Recommended Posts

I've had my unraid server up and running for a couple weeks now with no problems.  I'm starting to learn linux, scripting, etc at work and we use nedit.  I've tried to use vi but the commands to do anything are a pain!  How do I install nedit so it is my default text editor on my unraid box.  I want to add a weekly cron that backs up my really important stuff (pics of the kids) to an external usb hard drive.  I figured out how to mount a usb key and write to it last night (thanks to this site) so that problem is out of the way.

 

In summary, how do I install nedit?  I'm very new to linux so I'll have to be walked thru most, if not all of it.

 

Thanks!

 

J

Link to comment

I'm afraid that nedit is an editor that works using the "X-Windows client" on a target machine.  Since "X-Windows" does not exist on unRAID, you cannot install nedit.

(actually, you can install it, but cannot use it unless you also install X-windows... a huge undertaking)

 

I can see the need for an editor that is much easier to use for those who do not want to learn "vi," but since I've been using "vi" since the early 80's, I've gotten to where I install it on windows, as it beats almost anything out there for many tasks when programming and editing text files.  You can learn vi in a few minutes, and master it in a few years. (it is that powerful that most people do not know all of its capabilities... it can even make coffee, well close :-))  I used to know most of what it could do, but features have been added over the past 20 years or so.. so even I do not know everything it can do any more.

 

If you do not want to spend a lifetime, on the current release of unRAID is the "midnight-commander" package. It is an easy to use program to manage files.

One of its features is an editor. it is named "mcedit"

 

You can use it on the command line, or from within "mc" (midnight commander)

 

To get into midnight commander type

mc

 

It will let you browse the files and directories.  When you are in midnight commander the F4 function key will edit the file currently highlighted. (or Escape followed by number 4 if your function keys do not work)

 

If you use "putty" as your telnet client, it will even support the mouse and function keys will work

 

If you use the telnet built into windows, the function keys will not work, but you can use "ESC-1 through ESC-0" (escape followed by 1 through 0) to emulate F1 through F10.

 

It should get you going.

 

If you do not need to browse to a file you can invoke the editor directly like this:

 

To edit a file, simply type:

mcedit file_name

 

Hope this gets you going.

 

Joe L.

PS.

Be thankful you did not try to learn emacs (the other popular unix/linux editor)  If you were to invoke it on a file you would be fine until you try to get out of it. The key sequence to save a file and exit is not one you would stumble upon by accident.  ( Control-X Control-C )  I learned just enough emacs to be able to survive on a machine that did not have vi installed. ;)  Emacs can also do almost anything... including make coffee, polish your car, etc... :P

Link to comment

I'm afraid than nedit is an editor that works using the "X-Windows client" on a target machine.  Since "X-Windows" does not exist on unRAID, you cannot install nedit.

 

Duh.. Sorry for even posting the source link.

I didn't know it was an X-window client. I only use vi or emacs.

 

I can see the need for an editor that is much easier to use for those who do not want to learn "vi," but since I've been using "vi" since the early 80's, I've gotten to where I install it on windows

I install it on all my windows machines too. LOL... But I also install emacs as well.

 

I remember bitching so much when I went from Mainframe programming to Unix.

I forced myself to learn vi because it is on every Unix installation we had. In the end it became a very wise decision.

It just takes a different school of thought with the modes and cursor controls. thereafter it becomes second nature.

 

Emacs can also do almost anything... including make coffee, polish your car, etc... :P

and that it can, my co-worker is a developer for the emacs community. I'm always amazed on how he uses it.

Link to comment

oh... first the totally wrong public move of bitching about vi (oh how I agree with the guy... but don't admin it openly)

 

then of course the reply from the vi lover :)

 

then the other guy mentions emacs :) (who surprisingly has both installed - usually vi guys hate emacs guys and vice versa)...

 

oh I love the Internet :)

 

as for me... I just love UltraEdit for Windows ;)

(and CygnusEd when I used the Amiga - which has to be mentioned it was the best computer Ever)

 

...did this topic get too much off already or should I try harder? :D

 

 

 

Link to comment

hahahahhaha!  :D

 

Each editor has it's place. For quick edits vi is good.

For project based editing where there is many source files, emacs is good. I love them both.

with EMACS I have all my PF keys set so with a few key presses I indent, save, compile and point to the last error !

With tags I can bounce around between files without thought. I know this can be done with vi too, I've just been lazy.

 

as painful as vi is in the start, by not learning it well... I think you do yourself a disservice.

It eventually gets easier.

 

Link to comment

oh... first the totally wrong public move of bitching about vi (oh how I agree with the guy... but don't admin it openly)

True, is exactly like religion... see the following links ;D

http://www.dina.kvl.dk/~abraham/religion/

http://www.randsinrepose.com/archives/2004/01/16/editor_religion.html

http://www.randsinrepose.com/mt/lcom.cgi?entry_id=276

and part way down the page here talks about the church-of-emacs: http://en.wikipedia.org/wiki/Editor_war

 

then of course the reply from the vi lover :)

True, it is, by far, my favorite.

then the other guy mentions emacs :) (who surprisingly has both installed - usually vi guys hate emacs guys and vice versa)...

Very very true.

 

oh I love the Internet :)

 

as for me... I just love UltraEdit for Windows ;)

(and CygnusEd when I used the Amiga - which has to be mentioned it was the best computer Ever)

 

...did this topic get too much off already or should I try harder? :D

You need to try harder.  you did not mention golf, (another skill that you can learn in a few minutes and master in a lifetime) or food, or how you spent your summer vacation...  ;)

 

Joe L.

Link to comment

hahahahhaha!  :D

 

Each editor has it's place. For quick edits vi is good.

For project based editing where there is many source files, emacs is good. I love them both.

with EMACS I have all my PF keys set so with a few key presses I indent, save, compile and point to the last error !

With tags I can bounce around between files without thought. I know this can be done with vi too, I've just been lazy.

 

as painful as vi is in the start, by not learning it well... I think you do yourself a disservice.

It eventually gets easier.

 

I've used "tags" in vi for years.  Once you set them up, working on a large project is easy.  I even wrote my own programs/filters to generate tags for languages other than "C" and trained developers in my project teams on how to use them. (it is easy to use ctags, but most people don't even know it exists... much harder for other 4GL languages where a ctags equivalent does not exist.) In the same way, you can assign just about anything to the function keys in vi, in fact, a different assignment in "edit" mode vs. "command" mode.  vi Macros made it easy, and you could do the same tasks you described to indent, compile, etc. 

 

As I said, I learned enough emacs so I could edit a file, save it, and exit.  Basic editing is easy in emacs, as long as the arrow keys on the keyboard work, but... it is even less intuitive for many of its commands... including how to save the changes and exit.  Just in case I ended up in somebody else's "church"  ;) ;) ;)

 

Joe L.

Link to comment

hmmm wiki can get you carried away...

 

http://en.wikipedia.org/wiki/Indent_style

 

now, that's a nice subject :)

 

I started from "noidentwhatsoever" style, basically because I started from a CBM64, where you don't even need spaces (10?"NLS" is perfectly legal), to something close to Allman style (as I moved to Pascal at some point)... something that I think I keep up to today (if someone with a revolver on my head makes me code something).

 

 

Link to comment

hmmm wiki can get you carried away...

 

http://en.wikipedia.org/wiki/Indent_style

 

now, that's a nice subject :)

 

I started from "noidentwhatsoever" style, basically because I started from a CBM64, where you don't even need spaces (10?"NLS" is perfectly legal), to something close to Allman style (as I moved to Pascal at some point)... something that I think I keep up to today (if someone with a revolver on my head makes me code something).

 

 

Now we are getting off topic... but K&R style for me.  (I had the honor of having "R" attend a lecture I gave at Bell Labs on UNIX Security... my 15 minutes of geek fame)

 

Joe L.

Link to comment

So I actually had to do some stuff with vi today at work and it wasn't that bad (for basic editing), I did have a cheat sheet, but I got it done.  So I came home today ready to edit my go script to get the faster speed and vi didn't act at all like it did at work.  Now at work I was on a RedHat machine and here at home I'm on a windows machine working thru telnet.  But thanks to Joe L. I used midnight commander and got it done!  Thanks for the good directions Joe, b/c I did have to do the Esc + # to do the commands like you said.

 

Since you guys like talking about this soo much, tell me why it acted so differently on telnet vs my RedHat machine.

 

Thanks!

 

J

Link to comment

Everything is dependant upon terminal emulation.

 

The console is one emulation, telnet with vt100 is another.

As for speed, they should basically be the same speed.

 

Perhaps other work was occuring on your redhat machine or there may not be enough memory.

 

If you were editing over the internet or a slow connection, I could see how it would be slow and frustrating.

 

But from the console it should be responding well unless other work or memory is an issue.

 

BTW, if you want to use via with the graphical interface you can run gvim (if installed).

this will help you continue to become familiar with VI keystrokes.

 

There is also vim and gvim for windows.

Link to comment

Everything is dependant upon terminal emulation.

 

The console is one emulation, telnet with vt100 is another.

As for speed, they should basically be the same speed.

 

Perhaps other work was occuring on your redhat machine or there may not be enough memory.

 

If you were editing over the internet or a slow connection, I could see how it would be slow and frustrating.

 

But from the console it should be responding well unless other work or memory is an issue.

 

BTW, if you want to use via with the graphical interface you can run gvim (if installed).

this will help you continue to become familiar with VI keystrokes.

 

There is also vim and gvim for windows.

 

Sorry I should have been more clear.  Speed is definitely not the issure.  My RedHat box is a brand spanking new government issued HP desktop with the latest release of RedHat.  What was happening was the commands weren't acting the same at all.  h,j,k,l were not moving the cursor as they should, x and X were not deleting, it was weird.  But like I said, MC worked great so I'll just keep using that.

 

Thanks again.

 

J

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.