Every time I try to edit a file, I do mvim file.txt in the terminal then a new MacVim window pops up. But if I do vim file.txt, it will not open a new window. Instead, it will initialise vim within the terminal.

Question: How can I make sure that when I do mvim file.txt, MacVim will be opened up within the terminal just like what I did using vim.

I have tried the following solution already but it doesn't work.


1 Answer 1

$ mvim -v file.txt

does what you want.

You should alias vim to mvim -v, IMO.

  • I tried alias vim = "mvim -v" but couldn't manage to source the .bash_profile. Did I do something wrong. I got these 2 errors msg: -bash: alias: vim: not found -bash: alias: =mvim -v: not found Sep 3, 2014 at 9:19
  • Try alias vim='/path/to/mvim -v'.
    – romainl
    Sep 3, 2014 at 9:35
  • Spaces can't go around the = in the alias command. Sep 3, 2014 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.