On Sat, Jul 16, 2011 at 4:38 PM, Tony Mechelynck <[email protected]> wrote: [...] >> However, I wonder whether this default could be changed to R >> because, at least in Linux systems, it seems that there are far more R >> users than Rexx users: [...] > > Always comment your sources abundantly. It makes them more human-readable, > and in this case it helps Vim determine the filetype: if there is a line > whose first nonspace character is # Vim treats it as r, if there is a line > whose first two nonspace characters are /* Vim treats it as rexx. This is > done in one loop, testing all lines in turn for both possibilities until one > is found or the end-of-file is reached. Since Rebol is easiest to determine > (and is done first), this leaves only uncommented r and rexx sources for the > fallback.
Your suggestion is good for existing scripts, but the problem would remain for new files which when created are identified as Rexx. I maintain a plugin which includes a ftdetect/r.vim script that makes R to be the default, but R users who don't know about the plugin may think that Vim doesn't have syntax highlight for R if they start to edit a newly created file saved with .R extension. Best regards, Jakson Aquino -- You received this message from the "vim_dev" 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
