I'm still on 10.6.x at work so I'll still use iTerm2 for a while.ĮDIT: An even better way to use MacVim's CLI executable in your shell is to move the mvim script bundled with MacVim somewhere in your $PATH and use this command: $ mvim -vĮDIT: Yes, Terminal.app now supports 256 colors. So… basically my advice is to just use both.ĮDIT: I didn't try it but the latest version of Terminal.app (in 10.7) is supposed to support 256 colors. To have the same vim in MacVim and Terminal.app.Īnother difference is that many great colorschemes out there work out of the box in MacVim but look terrible in the Terminal.app which only supports 8 colors (+ highlights) but you can use iTerm - which can be set up to support 256 colors - instead of Terminal. profile: alias vim='/path/to/MacVim.app/Contents/MacOS/Vim'
You may install an up-to-date version via MacPorts or you can install MacVim and add an alias to your. Using one or the other is just a question of context for me.Īlso, like El Isra said, the default vim (CLI) in OS X is slightly outdated. Now I use both MacVim and Vim almost exactly the same way. I added some of my own, mimiking TextMate but, since I was working in multiple environments I forced my self to learn the vim way.
When I switched from TextMate I kind of liked the fact that MacVim supported almost all of the regular shortcuts Mac users are accustomed to.
I use both MacVim and Vim depending on the task and the context: if I'm in CLI-land I'll just type vim filename and if I'm in GUI-land I'll just invoke Quicksilver and launch MacVim. If you work mainly with CLI apps (ssh + svn + tcpdump, for example) you may prefer vim in the terminal.Įntering and leaving one realm (CLI) for the other (GUI) and vice-versa can be "expensive". If you work mainly with GUI apps ( YummyFTP + GitX + Charles, for example) you may prefer MacVim.
MacVim is more integrated in the whole OS than Vim in the Terminal or even GVim in Linux, it follows a lot of Mac OS X's conventions. Anything you are used to do in Vim will work exactly the same way in MacVim. If you run into trouble, let me know.MacVim is just Vim. Moreover, I'm a novice vim user (I use it for remote system administration only), so I can only help you on the Applescript part. > I'm afraid I don't have time right now to test this code, or to give additional details. > Select the lines in vim you want to execute, and do > echo "Can't create temporary file $TMPFILE (already exists)" > delay 0.5 - avoid deleting file before Stata reads it > osascript tell application id "11" to open POSIX file "$" > Similarly, if you wish to send a visual selection to Stata, create a script like the following: > Place the script on your path, and then, while editing a do-file in vim, do > osascript -e "tell application id \"11\" For example, to send the file you are currently editing to Stata, you could create the following (executable) shell script (note that you'll need to modify the Bundle identifier if you're using Stata 12): > You'll need to communicate with Stata via Apple events, which is most easily done via Applescript. > There is an old Statalist post by Dimitriy Masterov about getting Stata to launch from Vim on Windows, here: > Has anybody managed to integrate Stata with MacVim? I have made an attempt but I am stuck, as follows: > On Jul 31, 2011, at 12:14 PM, Gabi Huiber wrote: I want it to do it for me, as many times as Still, the original problem remains not solved: I don't want Stata to MP state that Lion saves by default when you quit Stata, so itīasically forces Stata to start with a clean slate. The first shell command there, "rm -Rf ", obliterates the Stata !osascript -e 'tell app "StataMP" to open "%:p"'
if has ('multibyte') if &termencoding '' let &termencoding &encoding endif set encodingutf-8 setglobal fileencodingutf-8 'setglobal. If it helps, I installed them using homebrew. Is there a way to get MacVim to handle Unicode characters appropriately. Without any warning messages is to rewrite my RunIt() function as Unicode characters appear in regular old vim in the terminal (iTerm), but not MacVim. I have tried other tricks too, with help from the MacVim e-mail list.įor example, one way to get Stata to open my do-file in the editor The blank spaces on either side of > are as shown above, if that Then Stata will start with the do-file editor open with the correctĭo-file loaded. "missing value" warning but have no effect on Stata, as far as I can Running, either in terminal or in the Vim command mode, produce the Subsequent calls to do-file, after Stata is The same thing happens if I edit Documents/hello.do in Vim and in This makes Stata 12 start up with the do-file editor open with a blankĭo-file that is called hello.do.
Suppose I had aĭo-file in the Documents folder that had two lines in it: The do-file bash script you suggested kind of works.
I will just take one problem at a time: first I sort out how to make I am making some progress, but I'm not there yet. Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at.