On Jun 14, 2012 at 08:05 AM -0700, Jason Slack-Moehrle wrote:
>In MacVim prefs I have checked: Open files from applications: in the
>as well as the pop-up below as: with a tab for each file.
That combination works here for me for files clicked in Finder.
For files opened from the command line, to open them up in a MacVim window that is already open, you'll probably need to use the --remote option. Also, perusing the command line options, it looks like the -p option will open the files in tabs. From my playing around with these options right now, --remote and -p don't work together. I had to use --remote-tab to get the combination behavior (open in the current MacVim instance, but in tabs).
> I am trying to create a macVim environment that allows files when
> double clicked from the Finder and opened via a command-line to be
> opened in MacVim in tabs.
> I have in my .vimrc:
> and in my .bash_profile:
> alias mvim="open -a "/Applications/MacVim-snapshot-64/MacVim.app""
> In MacVim prefs I have checked: Open files from applications: in the
> current window
> as well as the pop-up below as: with a tab for each file.
> I am still getting separate windows.
> Can anyone provide advice?
This works well to open files from the command line:
alias mvim='open -a macvim "$@"'
To have Finder open files with double click:
- find a file of the type (extension) you want to open in Finder
- in Finder highlight the file
- use "Finder > File > Get Info" --or-- command+I
- click the triangle next to "Open With"
- select MacVim, you may need to navigate using "Other..."
- finally select "Change All"
Then all files with that same extension will open with MacVim