_vimrc got ignored in all sub folders under home directory

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

_vimrc got ignored in all sub folders under home directory

Vincent Xu

Just got a new workstation at work. xp x64 sp2. version as attached,
but I cannot find a way to copy&paste the 2nd half of the info,
hopefully it is good enough.

vim works nicely in most of the folders including local drive, network
drive, but behaves weird in all the sub folders under home directory.
The _vimrc located in my home folder seems to be bypass in these
folders which I dont see the colorscheme I set, and the viminfo files
get created in every folder.

It is a company machine and I cannot re-install myself and I only have
permission in my home folder. Any info would be appreciated!

Best,
Vincent

------------------------------------------------------------------------------------------------------------------
:version
VIM - Vi IMproved 7.1 (2007 May 12, compiled Apr 12 2008 07:54:14)
MS-Windows 32 bit GUI version with OLE support
Included patches: 1-293
Compiled by [hidden email]
Big version with GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset
+cindent
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info
+comments
+cryptv +cscope +cursorshape +dialog_con_gui +diff +digraphs -dnd -
ebcdic
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path
+find_in_path
+folding -footer +gettext/dyn -hangul_input +iconv/dyn +insert_expand
+jumplist
 +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap
+menu
+mksession +modify_fname +mouse +mouseshape +multi_byte_ime/dyn
+multi_lang
+mzscheme/dyn +netbeans_intg +ole -osfiletype +path_extra +perl/dyn -
postscript
 +printer -profile +python/dyn +quickfix +reltime +rightleft +ruby/dyn
+scrollbind +signs +smartindent -sniff +statusline -sun_workshop
+syntax
+tag_binary +tag_old_static -tag_any_white +tcl/dyn -tgetent -
termresponse
+textobjects +title +toolbar +user_commands +vertsplit +virtualedit
+visual
+visualextra +viminfo +vreplace +wildignore +wildmenu +windows
+writebackup
-xfontset -xim -xterm_save -xpm_w32
   system vimrc file: "$VIM\vimrc"
     user vimrc file: "$HOME\_vimrc"
 2nd user vimrc file: "$VIM\_vimrc"
      user exrc file: "$HOME\_exrc"
............................................

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

Reply | Threaded
Open this post in threaded view
|

Re: _vimrc got ignored in all sub folders under home directory

Benjamin Fritz



On Mar 17, 10:53 am, ViX <[hidden email]> wrote:
> Just got a new workstation at work. xp x64 sp2. version as attached,
> but I cannot find a way to copy&paste the 2nd half of the info,
> hopefully it is good enough.
>

Try this:

:redir @*>
:version
(scroll as needed)
:redir END

Then paste.

> vim works nicely in most of the folders including local drive, network
> drive, but behaves weird in all the sub folders under home directory.

You mean, it doesn't source you Vim config files, or it has trouble
editing them?

> The _vimrc located in my home folder seems to be bypass in these
> folders which I dont see the colorscheme I set

Where are you putting your other initialization files? They should be
in $HOME/vimfiles/colors, $HOME/vimfiles/syntax, etc.

Your _vimrc should be in $HOME/_vimrc.

$HOME is as seen from Vim.

> and the viminfo files
> get created in every folder.
>

What is the value of your 'viminfo' option? Use the command, :set
viminfo? to see.

This option can control where your viminfo file is written to.
See :help viminfo-file-name.

> MS-Windows 32 bit GUI version with OLE support

So, you're running a 32-bit gvim on a 64-bit system? I imagine that
might cause some problems, but I don't know what.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: _vimrc got ignored in all sub folders under home directory

Vincent Xu

Thanks Ben, now I can have the complete version attached.

The vim works as expected before on my old 32bit machine. I think the
32bit vim on 64bit windows messed up something.

My _vimrc is at $HOME/_vimrc, where $HOME is h: drive. The problem is
vim seems not loading the _vimrc in all the subfolders in h: drive, I
dont see the color scheme in my _vimrc and the temp swp files got
created. But when I open files in other places like any folders in c:
and other network share folders, I can see the color scheme and no
temp file created like I set in the _vimrc.

-------------------------------------------------------------------------------------------------------------------------------------------------------------
VIM - Vi IMproved 7.1 (2007 May 12, compiled Apr 12 2008 07:54:14)
MS-Windows 32 bit GUI version with OLE support
Included patches: 1-293
Compiled by [hidden email]
Big version with GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset
+cindent +clientserver +clipboard +cmdline_compl
+cmdline_hist +cmdline_info +comments +cryptv +cscope +cursorshape
+dialog_con_gui +diff +digraphs -dnd -ebcdic +emacs_tags
+eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
+folding -footer +gettext/dyn -hangul_input +iconv/dyn
+insert_expand +jumplist +keymap +langmap +libcall +linebreak
+lispindent +listcmds +localmap +menu +mksession +modify_fname
 +mouse +mouseshape +multi_byte_ime/dyn +multi_lang +mzscheme/dyn
+netbeans_intg +ole -osfiletype +path_extra +perl/dyn
-postscript +printer -profile +python/dyn +quickfix +reltime
+rightleft +ruby/dyn +scrollbind +signs +smartindent -sniff
+statusline -sun_workshop +syntax +tag_binary +tag_old_static -
tag_any_white +tcl/dyn -tgetent -termresponse +textobjects
+title +toolbar +user_commands +vertsplit +virtualedit +visual
+visualextra +viminfo +vreplace +wildignore +wildmenu
+windows +writebackup -xfontset -xim -xterm_save -xpm_w32
   system vimrc file: "$VIM\vimrc"
     user vimrc file: "$HOME\_vimrc"
 2nd user vimrc file: "$VIM\_vimrc"
      user exrc file: "$HOME\_exrc"
  2nd user exrc file: "$VIM\_exrc"
  system gvimrc file: "$VIM\gvimrc"
    user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$VIM\_gvimrc"
    system menu file: "$VIMRUNTIME\menu.vim"
Compilation: gcc -O3 -fomit-frame-pointer -freg-struct-return -fno-
strength-reduce -DWIN32 -DHAVE_PATHDEF -DFEAT_BIG -DWINVER=0x0400 -
D_WIN32_WINNT=0x0400 -DFEAT_PERL -DDYNAMIC_PERL -
DDYNAMIC_PERL_DLL="perl58.dll" -DFEAT_PYTHON -DDYNAMIC_PYTHON -
DDYNAMIC_PYTHON_DLL="python25.dll" -DFEAT_RUBY -DDYNAMIC_RUBY -
DDYNAMIC_RUBY_DLL="msvcrt-ruby18.dll" -DDYNAMIC_RUBY_VER=18 -
DFEAT_MZSCHEME -DDYNAMIC_MZSCHEME -
DDYNAMIC_MZSCH_DLL="libmzsch370.dll" -
DDYNAMIC_MZGC_DLL="libmzgc370.dll" -DFEAT_TCL -DDYNAMIC_TCL -
DDYNAMIC_TCL_DLL="tcl84.dll" -DDYNAMIC_GETTEXT -DDYNAMIC_ICONV -
DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_CSCOPE -
DFEAT_NETBEANS_INTG -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -DFEAT_OLE -
march=i386 -Iproto -I/cygdrive/c/PERL/lib/CORE -I/cygdrive/c/PYTHON25/
include -I/cygdrive/c/RUBY/lib/ruby/1.8/i386-mswin32 -I/cygdrive/c/
PROGRA~1/MzScheme/include -I/cygdrive/c/Tcl/include -s -mno-cygwin
Linking: gcc -s -o gvim.exe  -luuid -lole32 /cygdrive/c/Tcl/lib/
tclstub84.lib -lwsock32 -mwindows -lcomctl32 -lversion -loleaut32 -
lstdc++
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: _vimrc got ignored in all sub folders under home directory

Gary Johnson-4

On 2009-03-17, ViX wrote:

> Thanks Ben, now I can have the complete version attached.
>
> The vim works as expected before on my old 32bit machine. I think the
> 32bit vim on 64bit windows messed up something.
>
> My _vimrc is at $HOME/_vimrc, where $HOME is h: drive. The problem is
> vim seems not loading the _vimrc in all the subfolders in h: drive, I
> dont see the color scheme in my _vimrc and the temp swp files got
> created. But when I open files in other places like any folders in c:
> and other network share folders, I can see the color scheme and no
> temp file created like I set in the _vimrc.

I know you know what $HOME is supposed to be, but I'm not convinced
that vim's notion of $HOME is the same as yours.  It is certainly
behaving as though it thinks $HOME is someplace else.

When you are in a subfolder, execute the following from within vim
and post the results.

    :echo $HOME
    :echo $MYVIMRC

Regards,
Gary



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

Reply | Threaded
Open this post in threaded view
|

Re: _vimrc got ignored in all sub folders under home directory

Vincent Xu

Thanks Gary for the info.

$HOME always gives me H: no matter where I open vim. But the $MYVIMRC
does not. In the subfolders of H: it gives me C:\Program Files
(x86)\vim\_vimrc and it is H:\_vimrc somewhere else.

Best regards,
Vincent.

On Mar 17, 4:53 pm, Gary Johnson <[hidden email]> wrote:

> On 2009-03-17, ViX wrote:
> > Thanks Ben, now I can have the complete version attached.
>
> > The vim works as expected before on my old 32bit machine. I think the
> > 32bit vim on 64bit windows messed up something.
>
> > My _vimrc is at $HOME/_vimrc, where $HOME is h: drive. The problem is
> > vim seems not loading the _vimrc in all the subfolders in h: drive, I
> > dont see the color scheme in my _vimrc and the temp swp files got
> > created. But when I open files in other places like any folders in c:
> > and other network share folders, I can see the color scheme and no
> > temp file created like I set in the _vimrc.
>
> I know you know what $HOME is supposed to be, but I'm not convinced
> that vim's notion of $HOME is the same as yours.  It is certainly
> behaving as though it thinks $HOME is someplace else.
>
> When you are in a subfolder, execute the following from within vim
> and post the results.
>
>     :echo $HOME
>     :echo $MYVIMRC
>
> Regards,
> Gary
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: _vimrc got ignored in all sub folders under home directory

Gary Johnson-4

On 2009-03-18, ViX wrote:

> On Mar 17, 4:53 pm, Gary Johnson <[hidden email]> wrote:
> > On 2009-03-17, ViX wrote:
> > > Thanks Ben, now I can have the complete version attached.
> >
> > > The vim works as expected before on my old 32bit machine. I think the
> > > 32bit vim on 64bit windows messed up something.
> >
> > > My _vimrc is at $HOME/_vimrc, where $HOME is h: drive. The problem is
> > > vim seems not loading the _vimrc in all the subfolders in h: drive, I
> > > dont see the color scheme in my _vimrc and the temp swp files got
> > > created. But when I open files in other places like any folders in c:
> > > and other network share folders, I can see the color scheme and no
> > > temp file created like I set in the _vimrc.
> >
> > I know you know what $HOME is supposed to be, but I'm not convinced
> > that vim's notion of $HOME is the same as yours.  It is certainly
> > behaving as though it thinks $HOME is someplace else.
> >
> > When you are in a subfolder, execute the following from within vim
> > and post the results.
> >
> >     :echo $HOME
> >     :echo $MYVIMRC

> Thanks Gary for the info.
>
> $HOME always gives me H: no matter where I open vim. But the $MYVIMRC
> does not. In the subfolders of H: it gives me C:\Program Files
> (x86)\vim\_vimrc and it is H:\_vimrc somewhere else.

I did a little experimenting with gvim 7.2.21 on a 32-bit machine
running Windows XP Professional.  I created a file, C:\_vimrc, set
HOME to C:, and started gvim from a Command Prompt in a directory
that had no _vimrc.  From within that gvim:

    :echo $HOME
    C:
    :echo $MYVIMRC
    C:\Program Files\Vim\_vimrc

Gvim did not see C:\_vimrc and chose $VIM\_vimrc instead.

I exited that gvim, cd'd to C:, and started gvim again.  This time
gvim used C:\_vimrc because it was in the current working directory.

    :echo $HOME
    C:
    :echo $MYVIMRC
    C:\_vimrc

Then I exited that gvim, cd'd back to the original directory, set
HOME to C:\, and started gvim again.  Gvim used C:\_vimrc again this
time.

    :echo $HOME
    C:\
    :echo $MYVIMRC
    C:\_vimrc

My conclusion is that gvim doesn't recognize a drive name alone as a
directory.  Perhaps the gvim on your old 32-bit machine was an older
version that did allow HOME to be just a drive name.  Or perhaps
that version of Windows handled drive names without directories
differently than your newer, 64-bit version does.  In any case, if I
understand your problem correctly, you can fix it by setting HOME to
H:\ instead of just H:.

HTH,
Gary



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

Reply | Threaded
Open this post in threaded view
|

Re: _vimrc got ignored in all sub folders under home directory

Vincent Xu

It doesnt work! Luckly, the $HOME env is in the user variables which I
can changed. That solved the vim problem for me. Hopefully it wont
break any in house tools. Thanks Gary.

Best,
Vincent

On Mar 18, 2:12 pm, Gary Johnson <[hidden email]> wrote:

> On 2009-03-18, ViX wrote:
> > On Mar 17, 4:53 pm, Gary Johnson <[hidden email]> wrote:
> > > On 2009-03-17, ViX wrote:
> > > > Thanks Ben, now I can have the complete version attached.
>
> > > > The vim works as expected before on my old 32bit machine. I think the
> > > > 32bit vim on 64bit windows messed up something.
>
> > > > My _vimrc is at $HOME/_vimrc, where $HOME is h: drive. The problem is
> > > > vim seems not loading the _vimrc in all the subfolders in h: drive, I
> > > > dont see the color scheme in my _vimrc and the temp swp files got
> > > > created. But when I open files in other places like any folders in c:
> > > > and other network share folders, I can see the color scheme and no
> > > > temp file created like I set in the _vimrc.
>
> > > I know you know what $HOME is supposed to be, but I'm not convinced
> > > that vim's notion of $HOME is the same as yours.  It is certainly
> > > behaving as though it thinks $HOME is someplace else.
>
> > > When you are in a subfolder, execute the following from within vim
> > > and post the results.
>
> > >     :echo $HOME
> > >     :echo $MYVIMRC
> > Thanks Gary for the info.
>
> > $HOME always gives me H: no matter where I open vim. But the $MYVIMRC
> > does not. In the subfolders of H: it gives me C:\Program Files
> > (x86)\vim\_vimrc and it is H:\_vimrc somewhere else.
>
> I did a little experimenting with gvim 7.2.21 on a 32-bit machine
> running Windows XP Professional.  I created a file, C:\_vimrc, set
> HOME to C:, and started gvim from a Command Prompt in a directory
> that had no _vimrc.  From within that gvim:
>
>     :echo $HOME
>     C:
>     :echo $MYVIMRC
>     C:\Program Files\Vim\_vimrc
>
> Gvim did not see C:\_vimrc and chose $VIM\_vimrc instead.
>
> I exited that gvim, cd'd to C:, and started gvim again.  This time
> gvim used C:\_vimrc because it was in the current working directory.
>
>     :echo $HOME
>     C:
>     :echo $MYVIMRC
>     C:\_vimrc
>
> Then I exited that gvim, cd'd back to the original directory, set
> HOME to C:\, and started gvim again.  Gvim used C:\_vimrc again this
> time.
>
>     :echo $HOME
>     C:\
>     :echo $MYVIMRC
>     C:\_vimrc
>
> My conclusion is that gvim doesn't recognize a drive name alone as a
> directory.  Perhaps the gvim on your old 32-bit machine was an older
> version that did allow HOME to be just a drive name.  Or perhaps
> that version of Windows handled drive names without directories
> differently than your newer, 64-bit version does.  In any case, if I
> understand your problem correctly, you can fix it by setting HOME to
> H:\ instead of just H:.
>
> HTH,
> Gary
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---