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

32008Re: art/lisp/scheme, plugins and patches for {filetype,scripts}.vim

Expand Messages
  • Dorai Sitaram
    Apr 6, 2003
    • 0 Attachment
      Bram wrote:
      >
      > Dorai wrote:
      >
      > > Here are two patches to filetype.vim and
      > > scripts.vim respectively. Their purpose:
      >
      > > 1. Recognize *.art files as ft=art
      >
      > I already had this one.

      Hm, I didn't see it in the cvs'd filetype.vim.

      > > 3. Identify Scheme scripts as ft=scheme based on
      > > either having a first line with a #! line containing
      > > 'scheme', or having either the first or second line
      > > contain 'scheme'.
      >
      > That second check is too generic. A normal text file with the word
      > "scheme" somewhere in the first two lines would be recognized as a
      > scheme file. You will have this check strickter.

      I have made it look for exec\s\+\S*scheme instead, i.e.
      "exec" followed by somespace followed immediately
      by a spaceless charseq containing "scheme". Here's the new patch
      for scripts.vim:


      *** scripts.vim Sat Apr 5 22:04:04 2003
      --- scripts.vim.new Sun Apr 6 09:27:01 2003
      ***************
      *** 114,119 ****
      --- 114,123 ----
      elseif s:name =~ 'wml'
      set ft=wml

      + " Scheme scripts
      + elseif s:name =~ 'scheme'
      + set ft=scheme
      +
      endif
      unlet s:name

      ***************
      *** 259,264 ****
      --- 263,273 ----
      elseif s:line1 =~ '^==\d\+== valgrind'
      set ft=valgrind

      + " Scheme scripts
      + elseif s:line1 =~ 'exec\s\+\S*scheme'
      + \ || s:line2 =~ 'exec\s\+\S*scheme'
      + set ft=scheme
      +
      " CVS diff
      else
      let lnum = 1


      (end of patch)



      > > I've also provided ftplugin/art.vim, ftplugin/lisp.vim,
      > > ftplugin/scheme.vim, and syntax/art.vim in
      > > http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html
      > > (download link is just below title).
      >
      > I'll download them this time. If you make improvements, please send
      > them to me directly.

      Will do so.
    • Show all 10 messages in this topic