Loading ...
Sorry, an error occurred while loading the content.

Syntax file for R help files

Expand Messages
  • Johannes Ranke
    Hi all, The R language and environment for statistical computing (www.r-project.org) has a well-defined syntax for writing help files reminding of tex syntax.
    Message 1 of 5 , Mar 1, 2006
    • 0 Attachment
      Hi all,

      The R language and environment for statistical computing
      (www.r-project.org) has a well-defined syntax for writing help files
      reminding of tex syntax.

      Anyone writing packages for R (there are many - see
      cran.r-project.org) needs to write these files.

      I put together a syntax file for R help files. You
      can look at it and download it from

      http://kriemhild.uft.uni-bremen.de/viewcvs/syntax/rd.vim?root=vim&view=markup

      I recommend it for inclusion in vim. Right now, it's part of my R
      filetype plugin on vim.org (debian package availabe).

      Happy Vimming,

      Hannes

      --
      Dr. Johannes Ranke jranke@...
      D-28359 Bremen http://www.uft.uni-bremen.de/chemie/ranke
    • Bram Moolenaar
      ... I can include it in the distribution. Please e-mail me a copy directly. It appears in the file rd is used as the name, thus the file would be called
      Message 2 of 5 , Mar 1, 2006
      • 0 Attachment
        Johannes Ranke wrote:

        > The R language and environment for statistical computing
        > (www.r-project.org) has a well-defined syntax for writing help files
        > reminding of tex syntax.
        >
        > Anyone writing packages for R (there are many - see
        > cran.r-project.org) needs to write these files.
        >
        > I put together a syntax file for R help files. You
        > can look at it and download it from
        >
        > http://kriemhild.uft.uni-bremen.de/viewcvs/syntax/rd.vim?root=vim&view=markup
        >
        > I recommend it for inclusion in vim. Right now, it's part of my R
        > filetype plugin on vim.org (debian package availabe).

        I can include it in the distribution. Please e-mail me a copy directly.

        It appears in the file "rd" is used as the name, thus the file would be
        called "rd.vim".

        How are these files recognized?

        --
        hundred-and-one symptoms of being an internet addict:
        27. You refer to your age as 3.x.

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ download, build and distribute -- http://www.A-A-P.org ///
        \\\ help me help AIDS victims -- http://www.ICCF.nl ///
      • Johannes Ranke
        ... That s great. I was hesitant to post it to the list, but it is not that big... ... see attachment. ... I think recognition based on their extension .rd or
        Message 3 of 5 , Mar 1, 2006
        • 0 Attachment
          * Bram Moolenaar <Bram@...> [060301 15:20]:
          >
          > Johannes Ranke wrote:
          >
          > > I recommend it for inclusion in vim. Right now, it's part of my R
          > > filetype plugin on vim.org (debian package availabe).
          >
          > I can include it in the distribution. Please e-mail me a copy directly.

          That's great. I was hesitant to post it to the list, but it is not that
          big...

          > It appears in the file "rd" is used as the name, thus the file would be
          > called "rd.vim".

          see attachment.

          > How are these files recognized?

          I think recognition based on their extension .rd or .Rd is sufficient,
          as I don't know of any conflicts.

          Hannes

          > --
          > hundred-and-one symptoms of being an internet addict:
          > 27. You refer to your age as 3.x.
          >
          > /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
          > /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
          > \\\ download, build and distribute -- http://www.A-A-P.org ///
          > \\\ help me help AIDS victims -- http://www.ICCF.nl ///

          --
          Dr. Johannes Ranke jranke@...
          UFT Bremen, Leobenerstr. 1 +49 421 218 8971
          D-28359 Bremen http://www.uft.uni-bremen.de/chemie/ranke
        • Thomas
          ... There is an rd format used for ruby documentation (it s becoming less popular though as rdoc gains popularity -- IMHO & as I see it). Maybe rhelp.vim ?
          Message 4 of 5 , Mar 1, 2006
          • 0 Attachment
            > It appears in the file "rd" is used as the name, thus the file would be
            > called "rd.vim".

            There is an rd format used for ruby documentation (it's becoming less
            popular though as rdoc gains popularity -- IMHO & as I see it). Maybe
            "rhelp.vim"?

            Cheers,
            Thomas.
          • Johannes Ranke
            ... rhelp.vim would be fine. In order to recognize R help files the pattern name{.*} can be used because, it is a necessary component in order to define
            Message 5 of 5 , Mar 1, 2006
            • 0 Attachment
              * Thomas <sanobast-vimdev@...> [060301 16:30]:
              > >It appears in the file "rd" is used as the name, thus the file would be
              > >called "rd.vim".
              >
              > There is an rd format used for ruby documentation (it's becoming less
              > popular though as rdoc gains popularity -- IMHO & as I see it). Maybe
              > "rhelp.vim"?

              rhelp.vim would be fine. In order to recognize R help files the pattern

              "\\name{.*}"

              can be used because, it is a necessary component in order to define the
              name of the object being documented. I have no idea if this pattern is
              likely to appear in a ruby documentation file, though.

              If so, the pattern

              "\\title{"

              is also necessary for a valid R help file.

              --
              Dr. Johannes Ranke jranke@...
              UFT Bremen, Leobenerstr. 1 +49 421 218 8971
              D-28359 Bremen http://www.uft.uni-bremen.de/chemie/ranke
            Your message has been successfully submitted and would be delivered to recipients shortly.