Ruby syntax checking in vim
ruby, ruby-on-rails, vim
Solution
awesome_person is right, `":w !ruby -c"` will do. To make it more convenient, add this line in your ~/.vimrc:
autocmd FileType ruby map <F9> :w<CR>:!ruby -c %<CR>
Then the syntax gets checked on pressing F9 key.
Problem
I use vim with various plugins for editing ruby code. I have proper syntax highlighting set up but I was wondering if anyone knew of a way to get ruby syntax checking, similar to what you might see in an IDE such as visual studio, radrails, etc? Something that would simply turn stuff red or break highlighting when I'm missing an 'end' or have an improperly constructed line of code would be sweet. I googled and came across this plugin, http://github.com/scrooloose/syntastic/tree/master but I was wondering if anyone had any better suggestions.