Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

When I save a file with Vim, the file permissions are changed. How do I configure Vim to save a file without changing the file permissions?

0
Posted

When I save a file with Vim, the file permissions are changed. How do I configure Vim to save a file without changing the file permissions?

0

‘backupcopy’ option is set to ‘no’ or ‘auto’. Note that the default value for this option is set in such a way that this will correctly work in most of the cases. If the default doesn’t work for you, try setting the ‘backupcopy’ option to ‘yes’ to keep the file permission when saving a file: :set backupcopy=yes This applies, only if you have configured Vim to make a backup whenever overwriting a file. By default, Vim will not backup files. For more information, read :help ‘backupcopy’ :help backup :help ‘backup’ :help ‘writebackup’ ============================================================================= SECTION 8 – BUFFERS 8.1.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.