Possible Duplicate:
Can I make vim do syntax highlighting on C++ headers that don't have extensions?
I'm using the R.vim script to source my .R files from vim to R-GUI using Applescript. However, this will only work if the file I open in vim has the .R extension.
When I open MacVim, the buffer has no extension, so I have to save the file as temp.R before I can use the shortcuts provided by R-vim for sourcing to R-GUI. I am predominantly an R-user, so I would like to make it so that, by default, when MacVim opens, it assumes the filetype is R and I can begin sourcing the buffer immediately.
Is there a way to automatically tell the buffer the filetype is R so that I don't need to write my buffer before sourcing to R?