[ANN] Vim/Ruby Configuration Files, 2004.09.20

D'oh!! This release was supposed to solve that issue once and for

all.

It intentionally creates \r\n lines for a Windows Vim installation and

\n

lines for a Unix installation. 'od' confirms this on my machine,

where I

have Vim installed for Windows and Cygwin (which is treated as Unix).

Perhaps Vim wants \n lines no matter what OS it's running on.

However, my

Windows gvim doesn't barf on the \r\n lines.

So can you give me more information about your situation? Anything I

can

do to reproduce it?

Don't poison my beer tomorrow or anything, but I'm using cygwin-vim from
a windows command-line... So perhaps it's not a problem for most users.
I found the easiest shell on windows was to use cmd.exe with cygwin\bin
on the PATH.

Assaph wrote:

So can you give me more information about your situation? Anything I
can do to reproduce it?

Don't poison my beer tomorrow or anything, but I'm using cygwin-vim from
a windows command-line... So perhaps it's not a problem for most users.
I found the easiest shell on windows was to use cmd.exe with cygwin\bin
on the PATH.

Forget poisoned beer; you'll hang for this! :slight_smile: Anyway, once I muster up
the courage to open cmd.exe, I'll try to reproduce it and fix it. I guess
you're using a Windows build of Ruby, which means the installer thinks
it's producing files for a Windows vim.

Anyone else with similar troubles in a different Vim/Ruby/OS setup?

Cheers,
Gavin

Gavin Sinclair wrote:

Forget poisoned beer; you'll hang for this! :slight_smile: Anyway, once I muster up
the courage to open cmd.exe, I'll try to reproduce it and fix it. I guess
you're using a Windows build of Ruby, which means the installer thinks
it's producing files for a Windows vim.

Anyone else with similar troubles in a different Vim/Ruby/OS setup?

As someone mentioned, vim doesn't have trouble with \n even in Windows. So the easiest thing to do is just use unix style files. If anyone is masochistic enough to want to edit them with another editor, they can convert it to \n\r first with vim. :slight_smile:

Or is win32 vim choking on startup with just \n?

Gavin Sinclair wrote:

Anyone else with similar troubles in a different Vim/Ruby/OS setup?

I installed from the tgz on my Gentoo Linux machine and it complained about all the \r's. I edited the files and the complaints went away.

Steve

I'm having a somewhat similar problem with vim 6.3 on windows. Because
i want to make sure i don't get weird ^M stuff in my files, I have set
the following in my _vimrc:
set ff=unix
set ffs=unix

Now, each time i do :h foo, or try to use a script that has ^M, i get
warnings/errors saying
Errors detected while processing modelines:
E518: Unknown option ^M

I suspect that this is actually my fault since the help files that
came with the win32 vim have crlf line endings and the default ff and
ffs settings detect and work ok with those files.

So(big assumption on my part here, haven't tested anything), this
probably works the other way too, if you have ffs=dos on windows,
files that only have \n in them fail.

···

On Mon, 20 Sep 2004 15:30:58 +0900, Gavin Sinclair <gsinclair@soyabean.com.au> wrote:

Anyone else with similar troubles in a different Vim/Ruby/OS setup?

Cheers,
Gavin

--
Cristi BALAN

Did you install by hand, or using the vim-ruby-install.rb program?

Gavin

···

On Tuesday, September 21, 2004, 9:03:40 AM, Steven wrote:

Gavin Sinclair wrote:

Anyone else with similar troubles in a different Vim/Ruby/OS setup?

I installed from the tgz on my Gentoo Linux machine and it complained
about all the \r's. I edited the files and the complaints went away.

Use:

set ffs=unix,dos,mac

You'll get Unix file support first, but you won't lose your ability to
work with \r\n files.

This does not appear to make a difference on Unix.

-austin

···

On Tue, 21 Sep 2004 23:12:34 +0900, Cristi BALAN <mental@gmail.com> wrote:

I'm having a somewhat similar problem with vim 6.3 on windows. Because
i want to make sure i don't get weird ^M stuff in my files, I have set
the following in my _vimrc:
set ff=unix
set ffs=unix

Now, each time i do :h foo, or try to use a script that has ^M, i get
warnings/errors saying
Errors detected while processing modelines:
E518: Unknown option ^M

I suspect that this is actually my fault since the help files that
came with the win32 vim have crlf line endings and the default ff and
ffs settings detect and work ok with those files.

So(big assumption on my part here, haven't tested anything), this
probably works the other way too, if you have ffs=dos on windows,
files that only have \n in them fail.

--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca
: as of this email, I have [ 6 ] Gmail invitations

Gavin Sinclair wrote:

I installed from the tgz on my Gentoo Linux machine and it complained
about all the \r's. I edited the files and the complaints went away.

Did you install by hand, or using the vim-ruby-install.rb program?

Actually, I mis-remembered. I installed the gem and then used vim-ruby-install.rb. (First gem installation.)

Steve

I know, I set the ffs=unix on purpose because i didn't want vim to
guess the ff by itself and leave me thinking i'm editing a unix file,
when I was actually editing a dos file. Tho, the only case when the ff
gets set to dos is the case when all line endings in the file are
crlf, but i don't want that, I want it to be predictable, I'd rather
put up with the ^M :slight_smile:

Thanks for the suggestion and sorry if my post seemed like I was
complaining about my settings, I was actually trying to guess why some
earlier post (the grandparent) had the \r problems :slight_smile:

···

On Tue, 21 Sep 2004 23:47:34 +0900, Austin Ziegler <halostatue@gmail.com> wrote:

On Tue, 21 Sep 2004 23:12:34 +0900, Cristi BALAN <mental@gmail.com> wrote:
> I'm having a somewhat similar problem with vim 6.3 on windows. Because
> i want to make sure i don't get weird ^M stuff in my files, I have set
> the following in my _vimrc:
> set ff=unix
> set ffs=unix
>
> Now, each time i do :h foo, or try to use a script that has ^M, i get
> warnings/errors saying
> Errors detected while processing modelines:
> E518: Unknown option ^M
>
> I suspect that this is actually my fault since the help files that
> came with the win32 vim have crlf line endings and the default ff and
> ffs settings detect and work ok with those files.
>
> So(big assumption on my part here, haven't tested anything), this
> probably works the other way too, if you have ffs=dos on windows,
> files that only have \n in them fail.

Use:

set ffs=unix,dos,mac

You'll get Unix file support first, but you won't lose your ability to
work with \r\n files.

This does not appear to make a difference on Unix.

--
Cristi BALAN

No problem. You *can* change the modeline to indicate the format. I
always see the "[dos]" and "[unix]" when I open a file, and if I'm
ever in doubt, I'll simply do "set ff".

-austin

···

On Wed, 22 Sep 2004 00:37:56 +0900, Cristi BALAN <mental@gmail.com> wrote:

I know, I set the ffs=unix on purpose because i didn't want vim to
guess the ff by itself and leave me thinking i'm editing a unix file,
when I was actually editing a dos file. Tho, the only case when the ff
gets set to dos is the case when all line endings in the file are
crlf, but i don't want that, I want it to be predictable, I'd rather
put up with the ^M :slight_smile:

Thanks for the suggestion and sorry if my post seemed like I was
complaining about my settings, I was actually trying to guess why some
earlier post (the grandparent) had the \r problems :slight_smile:

--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca
: as of this email, I have [ 6 ] Gmail invitations