On Fri, Mar 18, 2011 at 06:26:38AM -0700, Steve Hall wrote:
> From: Tony Mechelynck, Fri, March 18, 2011 5:51 am
> > On 18/03/11 03:11, Steve Hall wrote:
> > > 
> > > Can we not start distributing .vimrc and _vimrc instead of relying
> > > on the installer to create these?
> > [...]
> > 
> > If we distribute .vimrc and _vimrc, wouldn't that clobber any
> > existing user vimrc during an upgrade, the way, let's say,
> > $VIMRUNTIME/syntax/vim.vim is overwritten by an upgrade?
> 
> Depends on how it is distributed.
> 
> I've always thought it odd that the default vimrc requires any lines
> at all.

The default vimrc is no vimrc.  There's an example vimrc that the
installer installs to $VIM (which one can change through the "Advanced"
install options).

Part of the confusion, IMO, is that, on Windows, Vim treats $VIM/_vimrc
as an alternative location for the user's vimrc instead of as the
system-wide vimrc.  So, unlike on unix-like platforms, $VIM/_vimrc is
*only* sourced if $HOME/_vimrc doesn't exist instead of always being
sourced.

The other bit is that the Windows installers (both yours and Bram's),
have decided to use this to, by default, coddle new users by installing
a vimrc to $VIM/_vimrc enabling a bunch of options to make Vim act more
like a typical Windows application.  That may be the right thing to do
for new users, and leave the more experienced users to unselect that
option (as I do) when installing Vim on a new Windows system.  It
depends on what learning curve you want to present to new users.

> Why is the default behavior of the application required to be
> varied by a vimrc? A vimrc is for a user to alter defaults, but as
> long as I can remember Vim has distributed one with features differing
> by distribution. (Raise your hand if you count 100 times you've seen a
> Windows Vim user confused by the mswin line in _vimrc.) And each
> installer has to prompt the user whether or not to overwrite the
> existing vimrc.

The installer should be installing to $VIM, not $HOME.  Unfortunately,
many Windows users aren't used to the concept of $HOME and will tend to
edit the vimrc in $VIM instead of creating their own in $HOME.
Educating the users to put their own vimrc in $HOME is the right route
to avoid it getting overwritten.

> IMO, the "correct" behavior should be an empty vimrc named
> "vimrc-example". Various features can be included (commented) with
> simple explanatory text, like a reference tutorial of the top 100
> features most users tamper with. The first line explains how to rename
> the file to "activate" it.

Something similar to <http://vim.wikia.com/wiki/Example_vimrc>, but with
more settings commented out?

-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <james...@jamessan.com>

Attachment: signature.asc
Description: Digital signature

Raspunde prin e-mail lui