J'ai du mal à fusionner plusieurs versions de vim
sur ma machine. J'ai installé avec succès vim
via Homebrew. Voici le résultat de l'exécution brew info vim
:
vim: stable 8.1.1550 (bottled), HEAD
Vi 'workalike' with many additional features
https://www.vim.org/
Conflicts with:
ex-vi (because vim and ex-vi both install bin/ex and bin/view)
macvim (because vim and macvim both install vi* binaries)
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/vim.rb
==> Dependencies
Required: gettext , lua , perl , python , ruby
==> Options
--HEAD
Install HEAD version
==> Analytics
install: 89,945 (30 days), 222,053 (90 days), 835,730 (365 days)
install_on_request: 82,933 (30 days), 204,131 (90 days), 747,520 (365 days)
build_error: 0 (30 days)
Cependant, lorsque vous tapez vim --version
j'obtiens :
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Feb 22 2019 19:03:04)
Included patches: 1-503, 505-680, 682-1283
Compiled by root@apple.com
Il semble qu'il y ait 2 versions installées sur ma machine et que celle installée avec Homebrew ne soit pas la version par défaut. Comment puis-je en faire la version par défaut ?
Voici le résultat de l'exécution de diverses commandes pour le débogage :
-
type -a vim
:vim is /usr/bin/
-
echo $PATH
:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin
-
brew uninstall ex-vi macvim
:Error: No such keg: /usr/local/Cellar/ex-vi
-
brew list
:aom leptonica perl arpack libass pixman autoconf libbluray pkg-config cairo libcerf plotutils cmake libde265 portaudio eigen libevent pstoedit epstool libffi pyenv ffmpeg libheif pyenv-virtualenv fftw libmpc pyqt fig2dev libogg python flac libomp python@2 fltk libpng qhull fontconfig libsamplerate qrupdate freetype libsndfile qt frei0r libsoxr readline fribidi libtasn1 rtmpdump gcc libtiff rubberband gd libtool ruby gdbm libunistring sdl2 gettext libvorbis shared-mime-info gflags libvpx sip ghostscript libxml2 snappy giflib libyaml speex gl2ps little-cms2 sphinx-doc glib lua sqlite glog metis suite-sparse glpk mpfr sundials gmp netpbm szip gnuplot nettle tbb gnutls node tesseract graphicsmagick numpy texinfo graphite2 octave theora harfbuzz open-mpi unbound hdf5 openblas veclibfort icu4c opencore-amr vim ilmbase opencv webp imagemagick openexr wfdb ipython openjpeg x264 isl openssl x265 jasper opus xvid jpeg p11-kit xz jupyter pandoc zeromq lame pango latex2rtf pcre
-
brew uninstall vim
:Uninstalling /usr/local/Cellar/vim/8.1.1550... (1,855 files, 31.6MB)
-
brew install ex-vi
:Updating Homebrew... ==> Auto-updated Homebrew! Updated 2 taps (homebrew/core and homebrew/cask). ==> New Formulae antibody cxxopts k3d k6 yapf ==> Updated Formulae ansible hadolint jhipster ==> Downloading https://homebrew.bintray.com/bottles/ex-vi-050325.mojave.bottle.tar.g ######################################################################## 100.0% ==> Pouring ex-vi-050325.mojave.bottle.tar.gz /usr/local/Cellar/ex-vi/050325: 18 files, 348.2KB
-
brew install macvim
:==> Installing dependencies for macvim: cscope ==> Installing macvim dependency: cscope ==> Downloading https://homebrew.bintray.com/bottles/cscope-15.9.mojave.bottle.tar.gz ######################################################################## 100.0% ==> Pouring cscope-15.9.mojave.bottle.tar.gz /usr/local/Cellar/cscope/15.9: 11 files, 711.6KB ==> Installing macvim ==> Downloading https://homebrew.bintray.com/bottles/macvim-8.1-156.mojave.bottle.tar ==> Downloading from https://akamai.bintray.com/0a/0ae9784f9fb5afc98628250e542b8d1289 ######################################################################## 100.0% ==> Pouring macvim-8.1-156.mojave.bottle.tar.gz Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink bin/vi Target /usr/local/bin/vi is a symlink belonging to ex-vi. You can unlink it: brew unlink ex-vi To force the link and overwrite all conflicting files: brew link --overwrite macvim To list all files that would be deleted: brew link --overwrite --dry-run macvim Possible conflicting files are: /usr/local/bin/vi -> /usr/local/Cellar/ex-vi/050325/bin/vi /usr/local/bin/view -> /usr/local/Cellar/ex-vi/050325/bin/view ==> Summary /usr/local/Cellar/macvim/8.1-156: 2,214 files,
-
brew uninstall ex-vi
:Uninstalling /usr/local/Cellar/ex-vi/050325... (18 files, 348.2KB) You have new mail in /var/mail/mymac
-
brew uninstall macvim
:Uninstalling /usr/local/Cellar/macvim/8.1-156... (2,214 files, 35.9MB)
-
brew install vim
: Mise à jour de Homebrew... ==> Mise à jour automatique du Homebrew ! Mise à jour de 1 robinet (homebrew/cask). Aucun changement dans les formules.==> Downloading https://homebrew.bintray.com/bottles/vim-8.1.1550.mojave.bottle. Already downloaded: /Users/mymac/Library/Caches/Homebrew/downloads/06a6b020860987044c9b8081af3a27b1968e648ce496338bd99a572a656c148a--vim-8.1.1550.mojave.bottle.tar.gz ==> Pouring vim-8.1.1550.mojave.bottle.tar.gz 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. You can try again using: brew link vim ==> Summary /usr/local/Cellar/vim/8.1.1550: 1,855 files, 31.6MB
-
brew link vim
:Linking /usr/local/Cellar/vim/8.1.1550... Error: Could not symlink share/man/de/man1/ex.1 /usr/local/share/man/de/man1 is not writable.
Cependant, après ces étapes, j'obtiens toujours ce qui me dit que VIM n'a pas été mis à jour :
-
vim --version
:VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Feb 22 2019 19:03:04) Included patches: 1-503, 505-680, 682-1283 Compiled by root@apple.com