VI behavior strange in FC3
Gavin Li
gavinl at optech.ca
Wed Oct 26 15:28:35 UTC 2005
Thanks,
I have been using this since RedHat7.3, don't remember where it came.
vi: set cindent sw=4 ts=4 tw=4 :syntax on :
>Date: Wed, 26 Oct 2005 15:24:08 +0100
>From: Kelly Dunlop <kelly at xyzzy.clara.co.uk>
>Subject: Re: VI behavior strange in FC3
.To: For users of Fedora Core releases <fedora-list at redhat.com>
>Message-ID: <20051026142408.GA24870 at xyzzy.clara.co.uk>
>Content-Type: text/plain; charset=us-ascii
>
>On Wed, Oct 26, 2005 at 09:17:41AM -0400, Gavin Li wrote:
>> Hi,
>>
>> I use VI to edit C code, but most (>90%) chance it breaks lines when I
input
>> characters. Which config file do I have to change or it is a bug?
>> This is a sample of my code. I have no problem in RedHat7.3
>> /*
>> * $Id: helloworld.c,v 1.1 2005/06/23 19:50:50 gavinl Exp $
>> * vi: set cindent sw=4 ts=4 tw=4 :syntax on :
>> */
>> #include
>> <stdio.h>
>> #include
>> <string.h>
>> int
>> main(int
>> argc,
>> char
>> *argv)
>> {
>> printf("hello
>> world!\n");
>> for
>> (i=0;i<10;i++)
>> {
>> printf("i=%d\n",
>> i);
>> return
>> 0;
>> }
>> return
>> 0;
>> }
>
>I'd say it's the tw=4 in the header of the file that's causing you the
>problem. It sets the text width to 4 so the lines won't be very long :-)
>
>Did you pick the header up from elsewhere or did you construct it yourself
?
>
>Kelly
>--
>Kelly Dunlop
>kelly at xyzzy.clara.co.uk
More information about the fedora-list
mailing list