Welcome, Guest. Please login or register.

Author Topic: linex text editor?  (Read 2810 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Floid

  • Hero Member
  • *****
  • Join Date: Feb 2003
  • Posts: 918
    • Show all replies
Re: linex text editor?
« on: August 27, 2003, 10:38:10 AM »
Quote

Targhan wrote:

pico -w

It rules.  However, there are basically two Unix editor camps.  Emacs, and then, there is everyone else. :-P

I belong to the "everyone else" grouping.  Although, a simple printed "cheat sheet" is about the most helpful thing in the world for either VI or EMACS.


'vi' seems to be the 'everything else.'  Which is annoying if you're an ex-MS-DOS moron, and expect everything to be at least as straightforward as VDE was. ;)

If you want to use 'pico,' you may as well use 'nano.'  Systems intended to support people who like 'pico' may have one or the other installed.  (So remember both names.)

http://www.nano-editor.org/

A working knowledge of 'vi' - and 'ed,' its precursor - will probably save your posterior at least once, since nearly every *NIX maintains at least the latter in /sbin or some other place you'll have access to when you're stuck in single-user mode with none of your other partitions mountable.

When it comes to everyday use, I'd say there are four camps - those in the ever-ongoing vi vs. emacs "war" (both fit different niches); those getting by with nano, pico, or other 'niche' console-based editors that fit different people's opinions of 'usability'; and those who prefer to work from the GUI, and use editors that can only be used from within X (of which there are quite a few, many of which seem decent enough, especially in comparison to the mess that is console-land).

If you do decide to pick between emacs (a 20-40MB text-editing operating system) and vi (available in many flavors, most extremely-to-relatively light in comparison), keep in mind that both the 'real' GNU emacs and 'vim,' the most popular vi variant, can work in both X and console modes.  This doesn't mean either are point-and-click simple within X, of course, just that they have their own window-dressings available.

If you come across something called 'Xemacs,' that's a project that forked from the original GNU emacs years ago, and doesn't have much to do with X11 support anymore.  (In other words, the original 'GNU' flavor has long since caught up in that regard.)  Emacs fans swear by either, in practical terms there isn't much difference, but I have it on authority of one XEmacs fan that you're best off sticking with the straight GNU flavor until you develop any reasons to hate it.
 

Offline Floid

  • Hero Member
  • *****
  • Join Date: Feb 2003
  • Posts: 918
    • Show all replies
Re: linex text editor?
« Reply #1 on: August 27, 2003, 10:28:56 PM »
Quote

FluffyMcDeath wrote:
Forget vi .
You want Vim!!!

That's Vi IMproved.

It's hugely capable. Yes, it takes a bit of getting used to, but so does everything.

It started life on the Amiga back in 1988.
Props there - I forgot all about the heritage.  'Vim' is indeed the best 'vi' for serious work.  Do forgive us BSD fans for snickering at distros that use it by default, though -

-rwxr-xr-x  1 root  wheel  1301332 Jul  8 03:08 vim
-r-xr-xr-x  6 root  wheel  311156 Jun  5 00:24 nvi

...I think they're compensating for something. ;)  (Seriously for those trying to learn from this, it's a degree-of-complexity 'debate.'  Vim is cool, but the question is how far you trust it to work and not have possibly relied on an unnecessary dependency when your system's just blown apart.  The answer, of course, is that you can trust it quite far, because any kinks have long-since been ironed out, but shipping something 'simple' by default lets you worry about other things, like why you had to be in single-user with partitions unmountable.  The 5.x-branch of FreeBSD is in the process of trashing some of its recovery niceties in tradeoff for some new features, anyway... and if you run out of a single / partition with no separate /usr, you'll never get in a situation to notice the differences anyway; either your system will be hosed or it won't. ;-))

Asian1 said,
Quote
Another editor:  SED (Stream editor).
Try "man sed"
Man, sometimes I can't tell if you're kidding. ;-)  sed is a great tool - and part of the 'grep, awk, sed' trinity of 'things with silly names that hold UNIX together,' but it'd take a brave, slightly insane man to use it for daily editing.  It's quite handy for things like find/replace on a file ('stream') from the command line, once you've learned all about regular expressions...