Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Oct 2002 11:17:32 -0400
From:      Jon Nathan <jon+dated+1035818254.28aeb0@rupture.net>
To:        Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: fmt(1) inside vi
Message-ID:  <20021021151732.GO79229@froody.rupture.net>
In-Reply-To: <20021021002243.GB3652@hades.hell.gr>
References:  <20021020234954.GM79229@froody.rupture.net> <20021021002243.GB3652@hades.hell.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
* 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

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 <Char-0x0A> !}fmt


-jon


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?20021021151732.GO79229>