Tuesday, October 25, 2011

Re: Please fix: make Windows Vim use same files as unix. No reason not to and it's confusing in mixed envirionments.


` Ben Fritz wrote:
 On Oct 25, 11:39 am, Linda W <v...@tlinx.org> wrote:   
Ben Fritz wrote:On Oct 25, 2:52 am, Linda W<v...@tlinx.org>wrote:Comments: 1) that .vim isn't searched for in the same way with 'vimfiles', is a rather glaring BUG, given the above.   It's incompatible with the documented procedures for checking the names of .vimrc, .gvimrc, and .exrc.But, unlike the .vimrc/.gvimrc, any number of directories can be in the runtimepath. There is only one .vimrc.Sorry, but you lost me.   you can have any number of dirs named .vim? Huh? isn't  ".vim" searched for in the same locations as .vimrc/.gvimrc?? I wasn't asked for it to be searched for in the runtime path.  I am under (perhaps, the "mis-"), that .vim as a dir was searched for along for, or in the same way as .vimrc/.gvimrc and the breakage occurred because on Windows it uses a 15-20'yro restriction on filenames that applied to FAT to use another yet another special name for the sake of FAT12/16 & MS-DOS. I'm not talking about the 'VIMRUNFILES' where vim finds its own runfiles...but the USER rules that are read along side the "built-in" vimruntime dir files. ----The only reason Vim uses vimfiles at all on Windows, is that on Windows, 'runtimepath' defaults to including vimfiles instead of .vim. We could default to include BOTH, however this could easily break a lot of systems already out there, for example if they symlink .vim to vimfiles so they can use the same config on Cygwin/Linux.====     How? If vimfiles is a symlink to .vim, and it encounters .vim first... it will read it as .vim and stop looking for it.     
 You probably won't have multiple .vim files. I'm not suggesting that.   

But I asked how it would be incompat if it looked for .vim, if found, then don't look for vimfiles.?


 What I mean, is that while Vim only finds and reads a single .vimrc file, then stops, this is NOT what happens with the folders in "vimfiles". The ONLY reason Vim reads the contents of $HOME/vimfiles, is because by default, the 'runtimepath' option is:  	Unix:		"$HOME/.vim, 				$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after, 			$HOME/.vim/after"  	Amiga:	 	"home:vimfiles, 				$VIM/vimfiles,$VIMRUNTIME, $VIM/vimfiles/after, 			home:vimfiles/after"  	PC, OS/2: 	"$HOME/vimfiles,  				$VIM/vimfiles, $VIMRUNTIME, $VIM/vimfiles/after,  			$HOME/vimfiles/after"  	Macintosh:		"$VIM:vimfiles, $VIMRUNTIME, $VIM:vimfiles:after"  	RISC-OS:	"Choices:vimfiles,  				$VIMRUNTIME,  			Choices:vimfiles/after"  	VMS:		"sys$login:vimfiles,  				$VIM/vimfiles, $VIMRUNTIME,$VIM/vimfiles/after,  			sys$login:vimfiles/after"  Here, I assume "PC" refers to Windows. I observe my own runtime path (which I do not touch) matches this assumption.   

Ok .. I took the liberty of grouping the lines by type.  local-before, VIM standard, and local-after


I Can say one thing for certain.  The PC Version hasn't been a correct path since Win98 (if then).


HOME isn't a a system defined var.  HOMEDRIVE/HOMEPATH, yes...but not HOME.  So unless someone set it, it won't it won't exist.


Vim is using an undefined variable as PC's come from the factory.. 


Now you are complaining because I want to use a standard dirname off of a dir that, by default, doesn't exist?


You can say I should give up...Vim is going to adhear to it's 20 year old roots and standards and not change, but ... they said that about Unicode when I fought that battle and when I asked for variable width spacing in vim -- I was told it couldn't be done.  Bram just wasn't capable.

Bull.

It's not on win32, (one of the last places to get open-source support due to MS's hostility (screw them)), but it is on Linux, and cygwin's gvim.  , it's even on linux's tty based vim.

$HOME is undefined on Windows.  THAT might be one source of the problem.

It is NOT a system variable but has to be set by each person on their system.

If they want to use standards, then %HOMEDRIVE%%HOMEPATH% is the var to use.  But $HOME doesn't exist unless the user has defined it (directly or by installing some piece of software that does -- like cygwin...but then only for they launch from cygwin -- cygwin doesn't set home in the outside windows environment.

So It's ALREADY the case, that most users won't even know where to set HOME  .. just like someone
else said it's unlikely they will hit a command line, I bet even fewer know how to set permanent environment variables for all users or themselves...  It's hardly difficult in the system properties, but if they are they type that never touches a command line, what is the % likelihood that they will know where to change system properties..?

So looking for .vim in $HOME (for example) would be perfect, because you already have to have system admin knowledge on some level to have set it.

 This is by design. It allows users to very easily override anything in plugins or VIMRUNTIME files, and/or install plugins for use on a system at large which every user need not install but can probably use.   
---

    Looks pretty messed up and inconsistent.

 Now, you're proposing that Windows is inconsistent, because it doesn't check the $HOME/.vim directory. I would counter that it is truly Unix that is inconsistent.
Oh?  What other platforms try to use HOME?

 Out of all the systems with default values for 'runtimepath' listed, Unix is the only one which uses .vim. Every other system, and indeed Unix itself for the non-user-specific files, use "vimfiles". So, if any change is made, logically it would be to default Unix Vim to using $HOME/vimfiles, rather than defaulting Windows to use $HOME/.vim.   
That's because when vim was ported to them...all of them had more primitive file systems than what unix had at the time.  Unix is OS that set the standard.  vi was born there decades ago.

That's not the case on Windows, nor likely MAC...

If the file system supports it -- go with the standard.

 And I'm sure we can safely assume that Unix users everywhere would be angry for years if Bram decided one day to use vimfiles rather than .vim for the default Unix Vim config.   
----
    As opposed to making Win and Mac more compat, which would piss people off how?

Especially since $HOME isn't set in any version of widows since at least XP.  Might have
been set in Win98 and before.   But that's what I'm talking about...the standards it is following were for 15 years ago.   They aren't for today's OS's. 


No comments: