I accidentally deleted some files in the vim73 folder on my mac. How can I get the original files of my vim?


You can't hit a button and have this folder back. A system upgrade or a full re-install may help but it's maybe a little bit too much.

You could also install Vim from the sources and specify the default location as target. Normally I don't advocate that kind of method but you already messed with your system so…

The best solution, IMO, is simply to install another Vim, anywhere, and completely forget about the default Vim. It has always sucked in one way or the other anyway and the absolute best solution for using Vim on a Mac is still the same as it has been for quite some time: install (manualy or with Homebrew) MacVim which comes with a CLI executable.

And stop messing with those default files! If you want to customize/install stuff, do that in ~/.vim.


Do you use Time Machine?

If not, you should.

It really helps in times like these.

Plus it's SUPER easy to use.

  • 2
    This isn't exactly a solution, but more of a comment on what the OP should do in the future. – TheAmateurProgrammer Nov 1 '12 at 6:56
  • It is a solution if the OP already uses TimeMachine... Although he probably doesn't if he's asking this question, so good point. – jahroy Jun 21 '13 at 2:52

If you don’t want to reinstall vim (which is the preferred solution) then runtime files (those that are in /usr/share/vim/vim73) are located in mercurial repository of vim in runtime/ subfolder: http://code.google.com/p/vim/source/browse/runtime. You may need to specify exact vim version like http://code.google.com/p/vim/source/browse/runtime?name=v7-3-712 (directly in URL or by selecting in “Tag:” list), but most of time vim runtime files from newer versions work normally on older ones.

Note though that I would recommend reinstalling vim, not trying to undo the changes manually.

  • I deleted some files in /usr/share/vim/vim73, how to install the original vim. I only found an app called macvim which may not be what i want. – user1684696 Nov 1 '12 at 17:22
  • @user1684696 No idea, I don’t have mac. You can just fetch all files from the vim repository and put them into /usr/share/vim/vim73. Or install macvim, it should not hurt: What are the advantages of MacVim over Vim? There is also some advice to install vim from macports, but I don’t know how to do this exactly. – ZyX Nov 1 '12 at 18:43

I would uninstall then reinstall vim, using whatever you used to install it in the first place.

  • It's preinstalled with the OS. – duskwuff -inactive- Nov 1 '12 at 0:38
  • how to uninstall and how to reinstall? Thx:) – user1684696 Nov 1 '12 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.