I am totally new to Vim and my native language is not English, so my description might not be that accurate.
I am a MAC user and the system is Sonoma 14.4.1. Right now I am trying to install Vim according to this webpage Vim. macOS Setup Guide. Everything went well except when I tried to install Maximum Awesome.
When I tried to install it, the output of the terminal is like this:
(base) huxinwan@pal-nat186-168-243 ~ % cd maximum-awesome
rake
-- Homebrew --------------------------------------------------------------------
-- the_silver_searcher ---------------------------------------------------------
-- iterm2 ----------------------------------------------------------------------
-- ctags -----------------------------------------------------------------------
-- reattach-to-user-namespace --------------------------------------------------
-- tmux ------------------------------------------------------------------------
-- MacVim ----------------------------------------------------------------------
brew install --cask macvim
==> Downloading https://github.com/macvim-dev/macvim/releases/download/release-1
Already downloaded: /Users/huxinwan/Library/Caches/Homebrew/downloads/39cbc292cb6917d9d4ee26ec263e4b7165f76e85026cdae8886dbe7530668bc8--MacVim.dmg
==> Installing Cask macvim
==> Moving App 'MacVim.app' to '/Applications/MacVim.app'
==> Linking Binary 'mvim' to '/opt/homebrew/bin/gview'
==> Linking Binary 'mvim' to '/opt/homebrew/bin/gvim'
==> Linking Binary 'mvim' to '/opt/homebrew/bin/gvimdiff'
==> Linking Binary 'mvim' to '/opt/homebrew/bin/gvimex'
==> Linking Binary 'mvim' to '/opt/homebrew/bin/mview'
==> Linking Binary 'mvim' to '/opt/homebrew/bin/mvim'
==> Linking Binary 'mvim' to '/opt/homebrew/bin/view'
==> Unlinking Binary '/opt/homebrew/bin/view'
==> Unlinking Binary '/opt/homebrew/bin/mvim'
==> Unlinking Binary '/opt/homebrew/bin/mview'
==> Unlinking Binary '/opt/homebrew/bin/gvimex'
==> Unlinking Binary '/opt/homebrew/bin/gvimdiff'
==> Unlinking Binary '/opt/homebrew/bin/gvim'
==> Unlinking Binary '/opt/homebrew/bin/gview'
==> Backing App 'MacVim.app' up to '/opt/homebrew/Caskroom/macvim/179/MacVim.app
==> Removing App '/Applications/MacVim.app'
==> Purging files for version 179 of Cask macvim
Error: It seems there is already a Binary at '/opt/homebrew/bin/vim'.
rake aborted!
Command failed with status (1): [brew install --cask macvim ...]
/Users/huxinwan/maximum-awesome/Rakefile:38:in `brew_cask_install'
/Users/huxinwan/maximum-awesome/Rakefile:167:in `block (2 levels) in <top (required)>'
/Users/huxinwan/maximum-awesome/Rakefile:228:in `block in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
Tasks: TOP => install:macvim
(See full trace by running task with --trace)
I tried to search online and also tried brew install macvim
, and the output is like this:
(base) huxinwan@pal-nat186-168-243 ~ % brew install macvim
==> Downloading https://formulae.brew.sh/api/formula.jws.json
==> Downloading https://formulae.brew.sh/api/cask.jws.json
######################################################################### 100.0%
Warning: Treating macvim as a formula. For the cask, use homebrew/cask/macvim or specify the `--cask` flag.
==> Downloading https://ghcr.io/v2/homebrew/core/macvim/manifests/9.1.0
Already downloaded: /Users/huxinwan/Library/Caches/Homebrew/downloads/5546c85b34e88ab25aef06d541235786ffe2dafb6f1b8c5664cf9017c9aeb987--macvim-9.1.0.bottle_manifest.json
==> Fetching dependencies for macvim: cscope
==> Downloading https://ghcr.io/v2/homebrew/core/cscope/manifests/15.9
Already downloaded: /Users/huxinwan/Library/Caches/Homebrew/downloads/39671fbb2cd5b382c23a990dea7319c95fed0ac89271ab4570ea16b70b509fb1--cscope-15.9.bottle_manifest.json
==> Fetching cscope
==> Downloading https://ghcr.io/v2/homebrew/core/cscope/blobs/sha256:45fbc22efa3
Already downloaded: /Users/huxinwan/Library/Caches/Homebrew/downloads/86684a9b3fcfa06997064c00e5ce10b8c5c2ca85a002f2b71036efda0cac249d--cscope--15.9.arm64_sonoma.bottle.tar.gz
==> Fetching macvim
==> Downloading https://ghcr.io/v2/homebrew/core/macvim/blobs/sha256:9eaf223d23e
Already downloaded: /Users/huxinwan/Library/Caches/Homebrew/downloads/25f738eec82755fb701248bc9c6cf1096ecb3dd1810fd9260a29cdb1f686dcfe--macvim--9.1.0.arm64_sonoma.bottle.tar.gz
Error: Cannot install macvim because conflicting formulae are installed.
vim: because vim and macvim both install vi* binaries
Please `brew unlink vim` before continuing.
Unlinking removes a formula's symlinks from /opt/homebrew. You can
link the formula again after the install finishes. You can `--force` this
install, but the build may fail or cause obscure side effects in the
resulting software.
I am really confused and not sure what I should do. Should I unlink the original binary(I don't know what that is to be honest) or should I uninstall vim first and then reinstall?
That guide is terrible. Not only it reinforces the silly idea that a fancy setup is somewhat all one needs to be productive, but it also tells its readers to install programs that are already present out of the box without any rationale. Why Vim? Why install Vim when it is already there? Why should I install two conflicting distributions? Is Vim really that hard? And why should I install another freaking Git? Installing XCode's command-line tools already did that!
Terrible.
My recommendation would be to give up on all that crap, return to a pristine system, learn how things actually work… and, eventually, configure and install the stuff you need, when you need it, and how you need it.
Case in point, macOS already comes with Vim installed so, if you are Vim-curious, you don't have to install anything. Just open Terminal.app, type vimtutor
at the prompt, and off you go.
Now…
brew
command, then uninstall it. If you don't know how to do that, just ask brew
with $ brew --help
.brew
, then uninstall it. The built-in Terminal.app is more than capable. You can always install iTerm2 later if you feel that you need some of the mysterious "useful features" mentioned in that guide.