Good NEdit CLI backup

Randy Kramer rhkramer at gmail.com
Tue Apr 1 17:49:51 CEST 2008


On Tuesday 01 April 2008 03:03 am, Kris Van Bruwaene wrote:
> Aaron Hsu schreef:
> > Any recommendations on what editor regular NEdit users would find most 
> > useful on the command line?
> My favourite is joe. It has some of Nedit's nice features: vertical 
> (column) selections, syntax highlighting and regular expressions 
> (although not with the usual Perl syntax).

*I* would echo the recommendation for joe (or jed), both of which can use the 
old Wordstar editing commands (cursor movement type stuff), which are 
something I learned a long time ago.  (It also works with the more normal 
cursor movement commands, like the arrows, Home, End, etc.)

I'd also echo that you probably need to learn at least a little bit of vi.

It took me a while to learn vi--I learned a little bit at a time (and still 
don't know all that much)--some things (the cron editor, for example) use the 
vi editor (I suppose you can change it), so learning the simple things (the 
three possible modes, how to move between them, how to save and quit, how to 
edit or delete a line) are, imho, important.

Can I remember those well enough to give you a quick lesson?  (Well, I tried, 
and it might be helpful, especially if someone corrects it (getting old is a 
bitch)--at the bottom I have links to two tutorials that might be more 
helpful (I didn't try them today).)

   * start vi with vi <filename>
   * you will be able to view the file, but, iirc, not do any editing (nor 
deletion of lines)--iirc, this is known as command mode(?)
   * to edit the file, you have to switch to another mode like insert, by 
pressing i where (iirc) you can do most editing with the familiar keyboard 
editing commands (arrow keys, Home, End, Delete (or Backspace),...

   * <I'm sure there is another mode, but I can't recall what it is or how to 
get there> 

BTW, vi (and emacs) use the word "yank" for delete (also implying that what is 
yanked is put on the clipboard or whatever)

In either case, from insert or that other mode you can move back to  command 
mode by pressing Esc[ape].

From command mode:

   * to quit without saving, type :q (if you've made changes add ! (i.e., :q!) 
to force the quit)

   * to save and quit, type :wq

At times I get hung up with some message on the screen and have to press 
<ctrl>c to clear the message, and then I'll consider quitting without saving 
my changes and starting over.

There are things you learn by learning vi that are useful elsewhere, for 
example the use of /<searchterm> to look for something in the vi editor or, 
for example, on a man page.

Links to some tutorials:

   * 
[[https://www6.software.ibm.com/developerworks/education/l-vi/l-vi-5-5.html]
[vi: intro: the cheat sheet method]]

   * [[http://www.examcram2.com/articles/article.asp?p=339928&seqNum=5][vi 
chapter from LPIC Exam Cram 2]]--I don't want to learn any more vi than I've 
already been forced to learn (by osmosis), but if I had to, this looks like a 
very good resource--am I being too obstinate?  maybe--I just can't imagine 
that an "old style" editor like vi can be as useful as something like nedit 
(or anything more recent than nedit with similar features (like macros, 
almost wysiwyg editing, lots of easy to see gui stuff, but with macros and 
similar to automate things--after all it is the nirvana editor)

<links and comments are from some of my old notes>

Randy Kramer









More information about the Discuss mailing list