On Thu, Nov 04, 2010 at 02:58:18PM +0800, Dennis Cao wrote:
> But if I open it in the windows explorer, everything goes all right.
> 
> 
> Why are they different?
> 
> Thanks:)

Do you have only one version of Vim installed?  If there is more than
one, it could be that explorer is set to use one version of Vim while
your %PATH% leads you to a different version.

Another consideration is your %HOME% directory.  At work I run an app
that changes my %HOME% directory to another location.  While I had the
presence of mind to copy my _vimrc into both home directories, I'm not
as diligent when it comes to keeping both vimfiles/ directories up to
date.  When I spawn cmd.exe from that environment and try to run Vim,
I get all sorts of error messages because my vimfiles/ doesn't match
my _vimrc. 

You can use the :version command to compare where each instance of Vim
is going to load its settings.

The next best piece of advice I can offer that will help you track
this down is to take a look at the output of the :scriptnames command.
This will tell you just what files Vim has sourced, in-order.

Try doing something like this: 

Launch the Vim that works and run these commands:

:redir > goodvim.scripts.txt
:scriptnames
:redir END

Then launch your broken Vim, and:

:redir > badvim.scripts.txt
:scriptnames
:redir END

Then vimdiff them and see what's different.

-- 
Erik Falor
Registered Linux User #445632 http://counter.li.org

Attachment: pgpx0WVZ8VAZE.pgp
Description: PGP signature

Reply via email to