Michael Ludwig wrote:
> I'm running Windows XP pluc Cygwin, maintaining my Vim configuration in
> the Cygwin home directory, and sourcing it from Windows.
> 
>   C:\ :: type "%userprofile%\_vimrc"
>   set nocompatible
[...]
>   source C:\cygwin\home\michael\repos5ak\config\.vimrc

> The loading order can be seen by entering ":script". On Cygwin:
> 
>   1: /home/michael/.vimrc
>   2: /usr/share/vim/vim71/syntax/syntax.vim
>   3: /usr/share/vim/vim71/syntax/synload.vim
>   4: /usr/share/vim/vim71/syntax/syncolor.vim
>   5: /home/michael/repos5ak/config/.vim/filetype.vim    # custom first
>   6: /usr/share/vim/vim71/filetype.vim                  # system second
>   7: /usr/share/vim/vim71/ftplugin.vim
>   8: /usr/share/vim/vim71/indent.vim
>   9: /home/michael/repos5ak/config/.vim/abbreviations.vim
>  10: /home/michael/repos5ak/config/.vim/noeol.vim
>  11: /usr/share/vim/vim71/plugin/getscriptPlugin.vim
>  [...]
>  22: /usr/share/vim/vim71/ftplugin/mail.vim
> 
> But on Windows, "filetype.vim" is first loaded from the Vim
> distribution directory:
> 
>   1: C:\Dokumente und Einstellungen\michael\_vimrc
>   2: C:\cygwin\home\michael\repos5ak\config\.vimrc
>   3: C:\Programme\Vim\vim72\syntax\syntax.vim
>   4: C:\Programme\Vim\vim72\syntax\synload.vim
>   5: C:\Programme\Vim\vim72\syntax\syncolor.vim
>   6: C:\Programme\Vim\vim72\filetype.vim                        # system
>   7: C:\cygwin\home\michael\repos5ak\config\.vim\filetype.vim   # custom
>   8: C:\Programme\Vim\vim72\ftplugin.vim
>   9: C:\Programme\Vim\vim72\indent.vim
>  10: C:\cygwin\home\michael\repos5ak\config\.vim\abbreviations.vim
>  11: C:\cygwin\home\michael\repos5ak\config\.vim\noeol.vim
>  12: C:\Programme\Vim\vim72\plugin\getscriptPlugin.vim
>  [...]
>  22: C:\Programme\Vim\vim72\scripts.vim

Is C:\cygwin\home\michael\repos5ak\config the same location as
/home/michael? Does C:\cygwin\home\michael\repos5ak\config\.vimrc
have the same content as /home/michael/.vimrc? Perhaps you are
inadvertently sourcing different files, and you should be sourcing
C:\cygwin\home\michael\.vimrc? That would explain why the results are
unchanged when you change that file.

Can you manually check the values of all the relevant options and
variables are as you expect after starting Vim in both cases?:

:echo $HOME
:echo $VIM
:echo $VIMRUNTIME
:echo &rtp

I expect it is some kind of configuration problem, as looking at Vim's
source code, there is no reason I can see why the runtimepath order
would go wrong.

Your runtimepath is far from ideal, too. Something more like this would
be better:

let $HOME=C:/cygwin/home/michael/repos5ak/config
set 
rtp=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME/.vim/after

Most importantly, it keeps the after-directory in the list. The
system-wide vimfiles is also included. Advice you get on this list, on
the tips Wiki, in the help, etc. will assume you have a runtimepath much
like this.

Ben.


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to