0

i've installed macVim on mojave, a collegue added it as alias in .zshrc and also added an alias for it as "vim". Now, i want to change it with another alias like mvim, so i could use both the editor; so i unalias vim, removed the alias in .zshrc but i still see the new vim editor when i try to use vim command. where is the file that tell osx to open macVim instead vim? i've also tryed to uninstall macVim, but i still se the new editor. Sorry i'm new in osx ,i'm trying to be clear. Thanks

4
  • 1
    try a fresh installation by running brew install vim Commented Dec 19, 2018 at 10:06
  • if i do which vim it says : /usr/bin/vim so looks like its the original vim, but i see the vim welcome massage that i didn't saw previously Commented Dec 19, 2018 at 10:15
  • @AneesKodappana ok it works, but just to understand, if i want to add an alias, i've to alias vim=/Applications/MacVim.app/Contents/MacOS/Vim and also edit the .zshrc? Thanks Commented Dec 19, 2018 at 10:18
  • Why do you want to use Vim if you have MacVim? MacVim is almost entirely backward-compatible - I haven't found a significant difference in many years of use - and provides a superior experience on a Mac. Commented Dec 19, 2018 at 10:37

1 Answer 1

2

To check if your "vim" is aliased you can enter in your Terminal:

type vim 

To find out where your alias is set:

grep -s "alias" ~/.* | grep -i "vim" 

As you said, you may add in your .zshrc:

alias mvim=/Applications/MacVim.app/Contents/MacOS/Vim 

then to refresh the changes:

source ~/.zshrc 
Sign up to request clarification or add additional context in comments.

3 Comments

perfect, but i've also to edit the .zshrc? and add alias vim=/Applications/MacVim.app/Contents/MacOS/Vim also there? becouse i've did it in shell and it work, but in the .zshrc file there i didn't add it
i can see the alias by typing alias in shell but still didn't edited the .zshrc file
@ClaudioBiselli If you do the alias command in the shell, it won't be permanent: try to open a new terminal window, and it won't work. If you want your alias to be permanent, then you have to edit your .zshrc

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.