This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: win7 specific probs; examples; and poor solutions

On 2009-11-20, Linda Walsh wrote:
> Andy Koppe wrote:
> >2009/11/20 Linda Walsh:

> >> I've had changes made to files disappear
> >
> >Again, vague hand-waving is no help here.
> ---
>   No waiving of hands was necessary.  But a concrete example (using
> find+file to look text files under /prog/vim (/Program Files (x86)/Vim)
> and running dos2unix on each did run -- and 'vi' at cmd prompt worked.
> But later (yesterday, vi and cmd prompt gave CRLF related errors again.  I
> reran the conversion, differently, and it worked again.  
>   I use VIMRUNDIR="C:/Prog/Vim", in my environment.  This stems to a need
> for 'GVim' to know it's RUNTIME dir regardless of how it is invoked. 

This doesn't make sense to me.  Every vim I have ever used has set
VIMRUNTIME consistently every time it's run.  (I assume that's what
you meant by "VIMRUNDIR" since there is no VIMRUNDIR.)  Its value
does not depend on how vim is invoked.  There should be no reason
for the user to set VIMRUNTIME except in unusual circumstances.  See

    :help VIMRUNTIME

>   In order for 'GVim' to effectively replace 'notepad' for all things
> text, it needs to have a link in /Windows/system32/.

You could do that, or you could add the full path to the vim
directory to your PATH.

> Unfortunately, when invoked from there, it can't find it's
> RUNTIMEDIR.  So I set the global var.

There is something wrong there.  That shouldn't be necessary.

>   BUT, that created a problem for 'vim' under cygwin when I did edits in
> a cmd window -- as it would pickup the runtime dir in C:/Prog/Vim.
> Fortunately, the Win-version of Gvim is advanced enough to handle
> line-endings of CRLF OR LF -- so I convert all of the text files in the
> Win-version of 'Vim/Gvim' from "CRLF" to "LF".  Then all I need to do is
> keep the versions syncronized in major point release, and the cygwin-vim
> and Win-Gvim, can share config files.

I'm not sure which config files you mean.  Windows gvim uses
C:\Program Files\Vim\vim7 for its standard runtime files whereas
Cygwin vim uses /usr/share/vim/vim72.  There is no reason to share
those files between Windows and Cygwin versions of vim.  Keeping
them separate allows you to upgrade one vim without worrying about
also having to upgrade the other.

>   They also share my home dir's .vimrc, .gvimrc, and .vimdir.

Sharing those makes sense (except that I don't know what .vimdir
is).  You can also share .vim and vimfiles directories if you make
vimfiles a real directory and .vim a Cygwin symlink to vimfiles.

I think if you fixed your vim configuration to something not quite
so exotic, you might not have those problems.  Granted I'm using XP,
but I use both Cygwin 1.5 and 1.7 on different machines and I never
see problems with vim and gvim that depend on where or how they're


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]