Date: Thu, 25 Nov 1999 15:30:45 -0500 From: Greg Lehey <grog@mojave.sitaranetworks.com> To: Mark Ovens <mark@dogma.freebsd-uk.eu.org> Cc: Brooks Davis <brooks@one-eyed-alien.net>, James A Wilde <james.wilde@telia.com>, freebsd-questions@freebsd.org Subject: Re: Programmers' editor? Message-ID: <19991125153045.40243@mojave.sitaranetworks.com> In-Reply-To: <19991125192634.B316@marder-1>; from Mark Ovens on Thu, Nov 25, 1999 at 07:26:34PM %2B0000 References: <Pine.BSF.4.21.9911231240360.4557-100000@fw.wintelcom.net> <00e101bf3681$44cb04a0$8c0aa8c0@hk.tbv.se> <19991124103253.B2554@orion.ac.hmc.edu> <19991124135521.44585@mojave.sitaranetworks.com> <19991125192634.B316@marder-1>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, 25 November 1999 at 19:26:34 +0000, Mark Ovens wrote: > On Wed, Nov 24, 1999 at 01:55:21PM -0500, Greg Lehey wrote: >> On Wednesday, 24 November 1999 at 10:32:53 -0800, Brooks Davis wrote: >>> On Wed, Nov 24, 1999 at 02:39:01PM +0100, James A Wilde wrote: >>> >>>> And I don't really think vi is crap. It's just that the only >>>> thing less intuitive in its natural state than vi is probably >>>> emacs. <ducks and moves out of the war zone> <grin>. >>> >>> You aren't going to get any argument from me there. ;-) >> >> OK, I've said my piece here, and I disagree entirely. But it's not >> up to me; I've been using Emacs and similar editors for 20 years. > > A vi(1) user trying emacs(1) for the first time - > http://www.ukug.freebsd.org/~mark/badday.mpg :) > >> The real question is: what do newbies think? Anybody want to >> comment? > > OK, I'll comment. Since this emacs v. vi thing has reared it's head > again I used emacs instead of vi all day today (I even renamed vi, and > symlinked it to emacs to force myself). Brave man. With "newbie", I really meant somebody who hadn't used either editor. I'm not trying to convert vi users. > After the first couple of hours finding my way around (much use of > C-h) I got quite productive with it. The biggest difference I had to > adjust to was the fact that it doesn't have a command mode, any non > Ctrl-, Meta-, Shift-, Esc- chars you type go into the document, but > once I got used to that it wasn't so bad. I'd look on that as a plus. Two points to be made here: 1. If you want to enter any "special" characters, use c-q in front. 2. c-_ (control underscore; you'll normally use the shift key) will back out the last thing you entered. > One thing that I found puzzling is that several features that I would > consider basic editing requirements, especially for coding, are very > well hidden, for example: > > No apparent way to repeat the last command/editing action. I mentioned this before: m-p. In many cases, though, that's not the way you'd do it in Emacs. For example, in vi I'd use . to repeat an insert or a change command; in Emacs I'd do the insert and then copy the text to the kill ring (m-w), and then insert it elsewhere with c-y. The replace commands in Emacs are *much* more versatile, so I never find a need for . in this context. > ``goto-line'' doesn't have a default key-binding! When a > compiler reports errors/warnings it gives the line number so being > able to find it is essential (``<number>G'' in vi). Yes, I don't understand that either. It's easy enough to bind, of course. I have this in my .emacs: (global-set-key "=18=07" 'goto-line) > Indenting is a big mystery. OK, when in C-mode it will > auto-indent, but for non-code text it doesn't seem to work. > This e-mail is done in emacs and indenting this paragraph and > the one above I found impossible to do other than manually. > > The first line of each was started with a TAB but no way could I make > emacs indent the subsequent lines to match (``:se ai'' will do it > automatically in vi, and if you later edit it and mess it up then > ``!}fmt'' will clean it up). I tried selecting the paragraph and then > Edit->Fill, but all it did was split it into lines ~75 chars but only > the first line was indented! (the ``goto-line'' paragraph above). Emacs has a different approach to this issue. Each buffer has a mode assigned to it. When you edit C text, you automatically get the c-mode loaded. With text, by default, you get fundamental, which doesn't know much about indenting. The first thing you can do is load letter-mode, which will do what you want to do. It also modifies the way m-q (fill paragraph) works. > Also, it's far from obvious how to change the indentation of a block > of text, this paragraph for instance. In vi, just put the cursor on > the first line and ``>}''. m-q. > Do you know of a "Emacs for vi users" guide do you (preferably > on-line)? No, but O'Reilly does a book. Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991125153045.40243>