Date: Tue, 22 Oct 2002 04:41:21 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Jon Nathan <jon+dated+1035818253.d36404@rupture.net> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: fmt(1) inside vi Message-ID: <20021022014121.GD3432@hades.hell.gr> In-Reply-To: <20021021151732.GO79229@froody.rupture.net> References: <20021020234954.GM79229@froody.rupture.net> <20021021002243.GB3652@hades.hell.gr> <20021021151732.GO79229@froody.rupture.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2002-10-21 11:17, Jon Nathan <jon+dated+1035818253.d36404@rupture.net> wrote: > * Giorgos Keramidas <keramida@ceid.upatras.gr> [10-20-2002 21:06]: > > On 2002-10-20 19:49, Jon Nathan <jon+dated+1035762594.214939@rupture.net> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021022014121.GD3432>