Compatibility Issue of gvim at home

This memo is intended for those who are using the gvim text editor at home on a computer with a Windows operating system for writing either the source code for programs ( perl or otherwise ) or the source code for webpages and the created files will ultimately reside on a UNIX-based machine like your PASS-space.

Issue : There is a basic incompatibility between Windows and UNIX-based systems as to how they indicate the end of a line inside text files. This can have different consequences depending on the location (UNIX or Windows) at which your file was first created.

For example :
When files are originally created on a Windows-based machine which are containing source code ( perl ) and you transfer the file into your PASS-space and try to run your program you will receive an error message instead :

command not found

despite the fact that your first line in your file looks exactly like it should : #! /usr/bin/perl

What to do : The following steps have to be done only once but have to be done before you create a file under windows. Their aim is to append a file called  _vimrc which controls the behaviour of the gvim text-editor.
  1. Right-mouse click on the gvim-icon on your desktop to find out where your gvim text-editor is installed.
  2. Among the files belonging to gvim identify the precise location of a file called  _vimrc (the underscore is part of the file name)
  3. Use the gvim editor to open file  _vimrc and add two lines to the very bottom in that file so that the last two lines read :

    set  binary
    set  noeol

Effect : from now on your gvim text-editor will behave "correctly" and you can transfer perl-related files back and forth between your windos-based machine and your PASS-space.


Zig Herzog; hgn@psu.edu
Last revised: 09/21/04