This how I run rspec using cmd+r. in .vimrc
" Run Rspec for the current spec file
function! RunRspec()
ruby << EOF
buffer = VIM::Buffer.current
spec_file = VIM::Buffer.current.name
VIM::message "Running Rspec for #{spec_file}. Results will be displayed in
Firefox."
command = "ruby ~/.vim/bin/run_rspec.rb #{spec_file}"
system(command)
EOF
endfunction
map <F7> :call RunRspec()<cr>
map <D-r> <ESC>:w<CR><F7><CR>
just change the command accordingly.
Yi
On Aug 19, 2010, at 12:21 PM, Ken & Yoori Han wrote:
> Hi, I'm new to vim/macvim. If I'm editing a ruby file, I've learned to run it
> by :rubyf /path/to/rubyscript
> Is there a way to run the current buffer in a TextMate style cmd-R without
> having to type :rubyf filename each time? Thanks.
>
> Ken
>
> --
> You received this message from the "vim_mac" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php