views:

93

answers:

2

I'm on a Mac and when I am in TextMate editing a ruby file I can simply hit Command-R to execute the file and see the results in a new window. Is there something similar to this using MacVim?

It's really important that I be able to open up a NEW window. Reason is because in the current window I might have more than one full page of info. If that happens I can't scroll through it.

+2  A: 

You could create your own mapping to do it:

map <D-r> :w<CR>:!ruby %<CR>

% is the current file. If your file starts with #!/path/to/ruby you can omit the explicit call to ruby in your mapping.

Haven't tested the <D-r> mapping - no mac here. It's likely configuration dependent.

nfm
Nitpick: replace the `:w` with `:up`/`:update` which saves the file only if it is modified.
Dummy00001
A: 

The following question has the answer to exactly what I was looking for

http://superuser.com/questions/133886/vim-displaying-code-output-in-a-new-window-a-la-textmate

iljkj