On 16/07/11 21:11, Jakson Alves de Aquino wrote:
Hi,

When the file extension is either .r or .R, Vim looks for some clues
that may allow the identification of the script as R, Rebol or Rexx.
If no clue is found, filetype.vim assumes that the file is a Rexx
script. 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:

http://qa.debian.org/popcon.php?package=regina-rexx
http://qa.debian.org/popcon.php?package=r-base

Best regards,

Jakson Aquino


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.


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
132. You come back and check this list every half-hour.

--
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

Raspunde prin e-mail lui