Update built-in vim on Mac OS X

后端 未结 8 804
后悔当初
后悔当初 2020-12-12 08:50

I know this might be more appropriate at Ask Different, but as I tried adding tags there, there was no vim tag, only macvim. So I figured I might g

相关标签:
8条回答
  • 2020-12-12 09:23

    A note to romainl's answer: aliases don't work together with sudo because only the first word is checked on aliases. To change this add another alias to your .profile / .bashrc:

    alias sudo='sudo '

    With this change sudo vim will behave as expected!

    0 讨论(0)
  • 2020-12-12 09:27

    Like Eric, I used homebrew, but I used the default recipe. So:

    brew install mercurial
    brew install vim
    

    And after restarting the terminal homebrew's vim should be the default. If not, you should update your $PATH so that /usr/local/bin is before /usr/bin. E.g. add the following to your .profile:

    export PATH=/usr/local/bin:$PATH
    
    0 讨论(0)
提交回复
热议问题