Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7715719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:27:29+00:00 2026-06-01T02:27:29+00:00

On Windows, I normally work with Total Commander, which can easily be configured to

  • 0

On Windows, I normally work with Total Commander, which can easily be configured to ignore these *.*~ and *~ completely. But occasionally when I switch to Windows Explorer, I get little bit confused with all that “unknown” files/.

Can I set up Vim so that for every backup it creates it will also set “hidden” attribute?

Or set up some nice workaround?

I know I can set up Vim to put these in other directory, but I’d like to avoid that, since IIUC, it could suffer from naming conflicts.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T02:27:31+00:00Added an answer on June 1, 2026 at 2:27 am

    If the backup option is set, vim updates the backup file every time we write the file with :w. And every time, it creates a file which is not hidden even though you had forcibly hidden it previously! So we need to do something everytime we write the buffer into file.

    You can do this on windows. In your _vimrc file ( generally found at C:\Program Files (x86)\Vim ), add this line

    autocmd BufWritePost,FileWritePost * silent ! attrib +h <afile>~
    

    Where,

    attrib=Windows File attribute changinf command
    <afile>= Name of the file being sourced
    silent= Prevent an annoying command window from popping up and asking user to press a key
    

    This will make sure that the backup file gets hidden with every write to file from buffer. Why every time? Cos vim creates a non-hidden file at every write!

    But you have to live with a flashing black window ( command window where we are running attrib command ) every time you save your file, but worth the pain 🙂

    On linux/unix systems you can add this in your .vimrc

    autocmd BufWritePost,FileWritePost * silent ! mv <afile>~ .<afile>
    

    Hope this helps all those trying to find how to hide vim backup files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I normally don't work on Windows development, and am completely unfamiliar with the toolchain
I have many projects I work on normally, but I have one that consumes
Normally this would be something like: glutAddMenuEntry(-, <opid>); But it doesn't work. After looking
I normally code on windows and using MYSQL4.1. And mysql gem version is 2.8.1.
Is it possible to use an UnhandledException Handler in a Windows Service? Normally I
Ok, this is working on windows. My Java app is running and functioning normally
Normally you use Form.Visible to check if Window is visible at all. But sometimes
Normally we can specify a target in the link or use javascript window.open to
Windows Forms allows you to develop Components, non-visual elements that can have a designer.
Is there a Windows (or .NET) synchronization primitive that: can be shared across multiple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.