Today I wanted to “re-do” my vim installation, so I deleted some folders and files from the /Users/myname/ path (only vim connected), I then deleted MacVim, because I wanted to install it freshly (using janus etc). However, now after trying to re install it my terminal gives me the command not found: vim error. I suspect a symlink/path error but I have no idea how to solve this.
Share
Why would you install the janus package?
In your terminal, type
$ which vim. What does it say?Do you still have
/usr/bin/vim? Can you execute it?It’s the default Vim, as installed with Mac OS X. You are not supposed to touch it in any way, for any reason. The only reason why it wouldn’t be there would be because you have removed it or replaced it with a symlink to something that isn’t there anymore.
Do you still have
/usr/share/vim?These are the support files of the default Vim above. Again, you shouldn’t touch this folder.
Do you still have
~/.vim?This is where you are supposed to put your own support files. Did you delete it? Why?
Do you still have
~/.vimrc?This is your own
.vimrc. Did you delete it? Why?If you removed the default vim or you replaced it with a symlink and the symlink’s target is gone there is no way to put it back except by reinstalling the whole system.
At this point, no Vim on your system, you must reinstall it. There are many ways to do it but you’ll have to ask yourself a few questions:
Do I want a GUI only?
Do I want a CLI only?
Do I want both a CLI and a GUI?
The method depends on your answer:
GUI only
Install MacVim from here or via Homebrew.
CLI only
Install MacPorts.
Install Vim with this command:
You can also install Vim from source.
GUI + CLI
It’s the same as the “GUI only” path. When the install is done, make sure you have the
mvimscript in your$PATHand add this line to your~/.profile: