How to launch a terminal which executes vim from a script

terminal

Basically, what I want to achieve is something similar to gnome-terminal -e vim in Linux.

It will launch a vim window and when I quit vim with :q, the window will be closed.

How can I do this with Terminal?

Best Answer

First create a wrapper script for vim:

#! /bin/ksh
#
# vimwrapper
#
#
/usr/bin/vim

Make the script executable- chmod 755 vimwrapper and call the script like this

open -a Terminal.app vimwrapper