Use autocmd for key mappings

Using autocmd with FileType ruby will ensure that the mappings
will be available with any new buffers that are opened. Without it,
opening a new buffer and pressing <F4> will result in a literal <F4>
string being placed.