I used to love the terminal.app for many reasons.

I especially liked the way I could navigate to a file and edit using vim it all in one app, without having to leave the keyboard.

But, since the terminal.app doesn't support many of vim's rich features, I decided to make the step to MacVim.

This breaks the symmetry though, I have to use terminal.app to navigate to a file, edit in MacVim (using mvim of course), quit MacVim and open up the terminal again.

Isn't there a way to use MacVim in stead of terminal to do all this? I'm not talking about iTerm 2 etc, these apps don't cut is for me. I'm talking about true unix command line in MacVim..

This should be possible, I guess, only... is it?

  • 3
    I'm not sure I entirely understand this. MacVim is a texteditor, not a terminal. What "rich features" does vim offer that Terminal.app doesn't support? Commented May 15, 2011 at 21:30
  • 1
    You do realize that Mac OS X comes with command-line vim, right? Commented May 15, 2011 at 22:07
  • Terminal and iTerm are Unix command lines - vi/MacVim are editors which can call a unix command line
    – mmmmmm
    Commented May 15, 2011 at 22:14
  • Ok, first of all yes, I know the vim command line app, that's actually the whole point. My guess was that MacVim uses some sort of command line interface which you don't get to see because it is always in vim mode. exiting this vim mode in macvim means exiting macvim. But what if that could be disabled?
    – romeovs
    Commented May 16, 2011 at 5:50

4 Answers 4


You're confusing the terminal with the text editor, as other commenters have pointed out. Still, there are a number of ways to make the terminal more vim-like, or vim more terminal-like.

If it's vi-style keybindings in the terminal you're after, add set -o vi to your ~/.bash_profile (assuming you're using bash). This will allow you to use vi-style keybindings at the command line (hjkl movement, modal editing, etc.)

If you just want to be able to execute unix commands from within vim, prepend ! to the beginning of those commands at the (Mac)Vim command line. For example :!pwd will print the working directory.

There are also plugins like Conque which allow you to run a shell from within Vim, which sounds like it may be exactly what you're after.

  • Conque does come pretty close to what I want;.
    – romeovs
    Commented May 16, 2011 at 14:53
  • A key advantage of MacVim over terminal.app or iTerm is that it allows command keys to be bound. E.g. cmd+p can be mapped with nmap <D-p> foobarbaz. The terminal is built in (see my answer to this question) and it's very useful! Commented Feb 11, 2020 at 14:19

This is an old thread, but just in case someone else has this question:

mvim -v

  • 1
    And where do you get mvim from?
    – nohillside
    Commented Mar 10, 2012 at 14:35
  • mvim is a script included when you download the archive from the official site with the precompiled binaries. Just tested it. Works great ;o
    – SpoBo
    Commented Apr 8, 2012 at 14:10

If you are looking to navigate and open your files from within VIM, there are a couple things I suggest trying out.


:Sex in VIM or MacVim splits the screen and lets you navigate the file system to find a file. I have this bound to ;o in my install.


NERDTree is a VIM add-on that gives you a navigable tree view of the filesystem on the left-hand side of VIM. :NERDTreeToggle ~/path/to/whatever/ will open NERDTree for you, and the root of the tree will be ~/path/to/whatever/. In my VIM installs I use my home directory, and have it aliased to Control+o in .vimrc:

map <C-O> :NERDTreeToggle ~/<CR>

At least now, in 2020, this is built into MacVim. You can open the terminal with :terminal and you can navigate to and from it by tapping <C-w> twice.

For more information on usage, type :help terminal.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .