Silly question but when I try to edit the file it comes back that it's not 
editable.
Weird thing, Windows doesn’t show that it's write protected and there is no 
Windows service for VIM nor is there a VIM program running as per Task Manager, 
so I have no idea why Windows is saying it's not editable, unless VIM has done 
something fancy in the registry somehow.

Any advice on how to unlock the _vimrc  file in C:\Program Files (x86)\Vim\  ?


Thanks


-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Tony 
Mechelynck
Sent: Monday, November 20, 2023 8:21 PM
To: [email protected]
Subject: Re: How do you set options in the _vimrc file?

On Tue, Nov 21, 2023 at 2:03 AM Tim Chase <[email protected]> wrote:
>
> On 2023-11-21 00:37, Christian Castro wrote:
> > How do you change the options in the _vimrc file?
>
> It's just a text-file, so you can put in the settings you want.
> So you can just put these commands in that file:
>
>   set nohlo
>   set ts=4
>   set sw=4
>
> > Please let me know if the _vimrc file is editable from gVim or am I
> > going about this the wrong way (and what the right way is).
>
> So yes, you should be able to edit it like any other file.  It even
> comes with a handy built-in variable, so within vim you can
>
>   :e $MYVIMRC
>
> and it will open the appropriate file.
>
> Alternatively, you can use the
>
>   :mkvimrc
>
> command to take whatever your current settings are and write them to
> your vimrc file.
>
> -tim
>
> :help $MYVIMRC
> :help :mkvimrc

IIUC, :mkvimrc can create a vimrc but not modify an existing one.

The vimrc (i.e. the .vimrc or _vimrc) is a plain text file: it is made to be 
editable, typically with Vim. I recommend to start with a vimrc containing

:runtime vimrc_example.vim

and then add below that (or rarely above it) whatever suits your fancy to add 
settings not set by the vimrc_example.vim (and the defauts.vim which it 
sources) or to override those they do set.

Best regards,
Tony.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAJkCKXsYEEzPgLQjeLh%2BtWzZBVd1zLku4x2t0m0KqzG46Ov%2BLA%40mail.gmail.com.

****WARNING**** This email message (including any attachments) are to be 
treated as confidential/proprietary and may contain copyrighted or other 
legally protected information. It is intended only for the addressee(s) 
identified above. If you are not the addressee(s), or an employee or agent of 
the addressee(s), please note that any dissemination, distribution, or copying 
of this communication is strictly prohibited. If you have received this 
information in error, please destroy the information and notify the sender of 
the error. Thank you.

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/MN2PR13MB3326366B037350BFCDB63F679CBAA%40MN2PR13MB3326.namprd13.prod.outlook.com.

Reply via email to