From owner-freebsd-questions Mon Oct 21 8:17:42 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 9957637B401 for ; Mon, 21 Oct 2002 08:17:40 -0700 (PDT) Received: from froody.rupture.net (froody.rupture.net [63.236.108.93]) by mx1.FreeBSD.org (Postfix) with ESMTP id E480F43E6E for ; Mon, 21 Oct 2002 08:17:39 -0700 (PDT) (envelope-from jon@rupture.net) Received: from froody.rupture.net (localhost [127.0.0.1]) by froody.rupture.net (8.12.5/8.12.5) with ESMTP id g9LFHYA2051253 for ; Mon, 21 Oct 2002 11:17:34 -0400 (EDT) (envelope-from jon@rupture.net) Date: Mon, 21 Oct 2002 11:17:32 -0400 To: Giorgos Keramidas Cc: freebsd-questions@freebsd.org Subject: Re: fmt(1) inside vi Message-ID: <20021021151732.GO79229@froody.rupture.net> References: <20021020234954.GM79229@froody.rupture.net> <20021021002243.GB3652@hades.hell.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021021002243.GB3652@hades.hell.gr> User-Agent: Mutt/1.4i From: Jon Nathan X-Delivery-Agent: TMDA/0.62 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 * 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 Thanks Giorgos, I have localized the probelem. I have this: if ($?prompt) then # An interactive shell -- set some stuff up set filec set history = 100 set savehist = 100 set mail = (/var/mail/$USER) stty erase ^? if ( $?tcsh ) then bindkey "^W" backward-delete-word bindkey -k up history-search-backward bindkey -k down history-search-forward endif 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? Also, sort of related, how can I map ctrl-j to the fmt macro? I can't seem to send a literal ctrl-j to vi (to put it into .exrc). Typing ctrl-v ctrl-j gives me a carriage return. I can do this in .vimrc, which vim likes: :map !}fmt -jon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message