From owner-freebsd-questions Mon Oct 21 18:41:15 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E0FF37B401 for ; Mon, 21 Oct 2002 18:41:14 -0700 (PDT) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id F119643E7B for ; Mon, 21 Oct 2002 18:41:11 -0700 (PDT) (envelope-from keramida@ceid.upatras.gr) Received: from hades.hell.gr (patr530-a234.otenet.gr [212.205.215.234]) by mailsrv.otenet.gr (8.12.6/8.12.6) with ESMTP id g9M1f2fN017365; Tue, 22 Oct 2002 04:41:03 +0300 (EEST) Received: from hades.hell.gr (hades [127.0.0.1]) by hades.hell.gr (8.12.6/8.12.6) with ESMTP id g9M1fM48012046; Tue, 22 Oct 2002 04:41:22 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by hades.hell.gr (8.12.6/8.12.6/Submit) id g9M1fLST012045; Tue, 22 Oct 2002 04:41:21 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 22 Oct 2002 04:41:21 +0300 From: Giorgos Keramidas To: Jon Nathan Cc: freebsd-questions@FreeBSD.ORG Subject: Re: fmt(1) inside vi Message-ID: <20021022014121.GD3432@hades.hell.gr> References: <20021020234954.GM79229@froody.rupture.net> <20021021002243.GB3652@hades.hell.gr> <20021021151732.GO79229@froody.rupture.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021021151732.GO79229@froody.rupture.net> X-PGP-Fingerprint: C1EB 0653 DB8B A557 3829 00F9 D60F 941A 3186 03B6 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2002-10-21 11:17, Jon Nathan wrote: > * Giorgos Keramidas [10-20-2002 21:06]: > > On 2002-10-20 19:49, Jon Nathan wrote: > > > I'm trying to create a macro to justify a paragraph in vi. Something > > > similar to ctrl-j in pico. I found fmt(1). In its manpage, it says > > > [..] > > > stty: stdin isn't a terminal > > > > > > in the file. > > > > This is usually an indication of a common abuse of the shell startup > > files. You have used biff(1) or mesg(1) in a startup file that is run > > if ($?prompt) then > stty erase ^? > endif > > Note the stty statement appended in the middle of the stock (skel) > .cshrc. I added it at one point to fix backspace/delete problems > for some terminal emulator. When I comment it out, the vi/fmt macro > works nicely. Why is it problematic here though? Should this be > done in, say, .login instead? It causes problems because .cshrc is also read by non-login csh shells. Add it to .login instead. Explicitly setting erase to ^? is not a good idea, since you are not doing this for just the problematic terminal emulator but for all types of terminals, but that's another story. > Also, sort of related, how can I map ctrl-j to the fmt macro? I'm not sure. I rarely use /usr/bin/vi anymore. Giorgos. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message