On 06/03/09 23:26, John Beckett wrote:
> Edmon wrote:
>> I am running Gvim 7.2 on Vista.
>>
>> I want to modify startup settings and fonts and for some
>> reason _vimrc is being opened in read only mode, and I cannot
>> get to open it other way.
>
> I do not want to understand Vista, but on XP a user does not have write
> permission to files under the "Program Files" directory. If you install
> from some package (such as "Vim without Cream") you will probably end up
> with your files under Program Files.
>
> I run as a user (not in Administrators or Power Users groups), and put
> all my tools (and Vim) under a bin directory where I do have write
> permission.
>
> This tip has a little info on where you might put vimrc:
> http://vim.wikia.com/wiki/Vimrc
>
> John
Even when installing from "Vim without Cream", the normal place for a
vimrc is what Vim regards as $HOME, and that is normally not under
"Program Files" but under that particular user's personal directory -- see
:echo $HOME
when running Vim.
However, if Vim finds no $HOME/_vimrc and no $HOME/.vimrc, on Windows it
will also look for $VIM/_vimrc, and that indeed ussssssually means
C:\Program Files\Vim\_vimrc. If that's where your _vimrc is now, try the
following:
:view $VIM/_vimrc
:saveas $HOME/_vimrc
The file should not be readonly anymore, and you ought to be able to
edit it normally using Vim, or any other editor for that matter. Also, a
_vimrc in $HOME will be preferred to one in $VIM so you don't need to
delete that other version (which would require administrator's
privileges, and on Vista, IIUC, even an administrator's account does
_not_ have those privileges until or unless you explicitly ask for
them), unless that $VIM/_vimrc shouldn't be available to all users.
Note that regardless of whether or not a $HOME/_vimrc is present, Vim
looks first for a $VIM/vimrc (with no underscxore or dot prepended) and
sources it if found. (This is called a "system vimrc".) Only then does
it look for $HOME/_vimrc, sources it if found, and looks for it at other
places if not found.
Best regards,
Tony.
--
ERIC IDLE PLAYED: THE DEAD COLLECTOR, MR BINT (A VILLAGE NE'ER-DO -WELL VERY
KEEN ON BURNING WITCHES), SIR ROBIN, THE GUARD WHO
DOESN'T
HICOUGH BUT TRIES TO GET THINGS STRAIGHT, CONCORDE (SIR
LAUNCELOT'S TRUSTY STEED), ROGER THE SHRUBBER (A
SHRUBBER),
BROTHER MAYNARD
"Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---