How to edit vimrc file on Windows 7?

1,721 views
Skip to first unread message

wolfv

unread,
Nov 26, 2011, 5:30:35 PM11/26/11
to vim_use
I am attempting to save changes to vimrc file (C:\Program Files
(x86)\Vim\_vimrc) using Vim 7.3.46 on Windows 7.

When I type :w! this message appears:
"_vimrc" E212: Can't open file for writing
So I tried :w!!, but that didn't work either.

I am logged in as Administrator. The _vimrc file Properties, Security
tab, says
Permissions for Administrators, Allow Write
The Read-only attribute is not checked.

How to edit vimrc file on Windows 7?

Ben Fritz

unread,
Nov 26, 2011, 11:34:36 PM11/26/11
to vim_use

I believe this is the user account control or whatever UAC stands for.
In order to gain admin access, you actually need to TELL Windows,
"even though I'm admin, yes, I actually want to be admin for this
action" when you launch Vim.

Or, even better, don't edit the _vimrc in the Program Files directory.
Instead, edit it in your user-specific directory, which you can find
from within Vim by typing:

:echo $HOME

and pressing enter.

Reply all
Reply to author
Forward
0 new messages