macvim – command not found: vim

macvim – command not found: vim

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?

    Its 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 wouldnt be there would be because you have removed it or replaced it with a symlink to something that isnt there anymore.

  • Do you still have /usr/share/vim?

    These are the support files of the default Vim above. Again, you shouldnt 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 symlinks 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 youll have to ask yourself a few questions:

  1. Do I want a GUI only?

  2. Do I want a CLI only?

  3. 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

    1. Install MacPorts.

    2. Install Vim with this command:

      $ sudo port install vim +huge
      

    You can also install Vim from source.

  • GUI + CLI

    Its the same as the GUI only path. When the install is done, make sure you have the mvim script in your $PATH and add this line to your ~/.profile:

    alias vim=mvim -v
    

macvim – command not found: vim

Leave a Reply

Your email address will not be published.