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
- 1try a fresh installation by running brew install vimAnees– Anees2018-12-19 10:06:56 +00:00Commented 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 previouslyclaud.io– claud.io2018-12-19 10:15:03 +00:00Commented 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? Thanksclaud.io– claud.io2018-12-19 10:18:32 +00:00Commented 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.Amadan– Amadan2018-12-19 10:37:52 +00:00Commented Dec 19, 2018 at 10:37
Add a comment |
1 Answer
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 3 Comments
claud.io
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
claud.io
i can see the alias by typing alias in shell but still didn't edited the .zshrc file
Yoric
@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