How to set EDITOR

12 views
Skip to first unread message

jasonpi...@gmail.com

unread,
Mar 15, 2018, 12:19:45 AM3/15/18
to vim_mac
How do I set the EDITOR variable so that MacVim will launch within my terminal and not a separate GUI?

I tried:
> export EDITOR='mvim -v'
But that doesn't work.

Running it directly does work:
> mvim -v

Normal vim does what I expect:
> export EDITOR='vim'

In case it makes any difference, EDITOR is being used when I execute:
> direnv edit .


Cheers

Andrew Stewart

unread,
Mar 15, 2018, 4:05:47 AM3/15/18
to vim...@googlegroups.com

> How do I set the EDITOR variable so that MacVim will launch within my terminal and not a separate GUI?

This works for me:

export EDITOR='/Applications/MacVim.app/Contents/MacOS/Vim'

Yours,
Andrew Stewart

Bailey Stoner

unread,
Mar 15, 2018, 5:54:15 AM3/15/18
to vim...@googlegroups.com
Hi Jason,

I don't know if it helps, but exporting EDITOR only works in the shell that you run it from. I'm guessing you ran it in a different shell. If not, then I think we will need more deets on exactly what you're doing :)

You could also try ` EDITOR=mvim direnv edit .`, but I'm guessing having it inline isn't ideal for your use-case. Hope that helps :)

Best,
  Bailey

14. Mar 2018 20:04 by jasonpi...@gmail.com:

--
--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages