Save and run a ruby file in VIM using F5 as shortcut
Put this
autocmd FileType ruby nmap <F5> <ESC>:w<cr> :!ruby %<cr>
in your vimrc
The principle applies to most other programming languages as well, maybe with the intermediate step of compiling.
Written by Hannes Walz
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#