vim - Running gvim from MSYS --- how to avoid/change MSYS enviroment variables? -
when run gvim msys, things go wrong during initialization. namely, gvim can't find initialization files in 'c:\documents , settings\username\vimfiles.
[specifically, gvim reports error e117: unknown function: pathogen#infect during initialization, never found autoload\pathogen.vim. doing :scriptnames confirms none of setup files vimfiles\ run.]
i think i've debugged why goes wrong. when start msys, msys shell inherits windows enviroment variables, changes of them it's custom values. c:\documents , settings\username value of $home in windows, msys sets c:/msys/user name. , of course, vim uses $home find right initialization files.
i notice set shell? has changed shell=c:/msys/bin/sh instead of shell=c:\windows\system32\cmd.exe, hope isn't important fixing initialization problem.
i need run gvim normal windows environment variables. @ least need able manually override few important ones $home specify (i.e., i'm not concerned windows $home changing, it's fine use static value).
i tried reset $home manually in vimrc, late.
is there trick specifying $home on during initialization, or command line parameter?
alternatively, there trick running commands msys differently? know nothing how shell c:/msys/bin/sh works, conceive of arguments changes visibile environment command (e.g. gvim.exe) typing.
---edit---
reposting solution worked (it achieves later idea):
instead of running gvim.exe, run command home="c:\documents , settings\username" gvim.exe
in bash , other unix shells, can do:
$ home='/path/to/dir' gvim to temporarily set $home different value.
i admit i'm not familiar @ windows command line, might worth try.
Comments
Post a Comment