A quick note recording an issue I solved for my Vim on the mac.

Spec

M1 Mac 2020, macOS Monterey 12.0.1

The Original Problem

All of sudden my Vim lost its Python support, or maybe just LeaderF is not happy with my local Vim. Anyways - my Vim's Python support is broken and I can't use fuzzy search!

Reinstall the Vim

Yes, this is the solution.

Last time I installed Vim from Vim repo and used make. However I forgot whether I have replaced the built-in Vim binary under /usr/bin. Again, it doesn't matter, let's use HomeBrew this time, yay?

brew install vim

A new knowledge I learned (to be more accurate, I knew but I didn't realize), is to use brew link to replace the existing Vim that is under /usr/bin. Simply run:

brew link vim

HomeBrew will copy the binary to /usr/local/bin and links the vim command with it.

Potential Issues

Brew link failure:

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/man/de/man1/ex.1
/usr/local/share/man/de/man1 is not writable.

This is due to brew doesn't have the permision to this specific directory. Before you use the sudo power to run the command, please just limit it to this directory.

Solution: sudo chown -R whoami:admin /usr/local/share/man/de/man1

Still can't see it?

Try restart your terminal 👿


It should be fixed now.