home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / runtime / dos / ftplugin / scheme.vim < prev    next >
Encoding:
Text File  |  2012-05-31  |  1.7 KB  |  48 lines

  1. " Vim filetype plugin
  2. " Language:      Scheme
  3. " Maintainer:    Sergey Khorev <sergey.khorev@gmail.com>
  4. " URL:         http://sites.google.com/site/khorser/opensource/vim
  5. " Original author:    Dorai Sitaram <ds26@gte.com>
  6. " Original URL:         http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html
  7. " Last Change:   Mar 5, 2012
  8.  
  9. " Only do this when not done yet for this buffer
  10. if exists("b:did_ftplugin")
  11.   finish
  12. endif
  13.  
  14. " Don't load another plugin for this buffer
  15. let b:did_ftplugin = 1
  16.  
  17. " Copy-paste from ftplugin/lisp.vim
  18. setl comments=:;
  19. setl define=^\\s*(def\\k*
  20. setl formatoptions-=t
  21. setl iskeyword+=+,-,*,/,%,<,=,>,:,$,?,!,@-@,94
  22. setl lisp
  23.  
  24. " make comments behaviour like in c.vim
  25. " e.g. insertion of ;;; and ;; on normal "O" or "o" when staying in comment
  26. setl comments^=:;;;,:;;,sr:#\|,mb:\|,ex:\|#
  27. setl formatoptions+=croql
  28.  
  29. " Scheme-specific settings
  30. if exists("b:is_mzscheme") || exists("is_mzscheme")
  31.     " improve indenting
  32.     setl iskeyword+=#,%,^
  33.     setl lispwords+=module,parameterize,let-values,let*-values,letrec-values
  34.     setl lispwords+=define-values,opt-lambda,case-lambda,syntax-rules,with-syntax,syntax-case
  35.     setl lispwords+=define-signature,unit,unit/sig,compund-unit/sig,define-values/invoke-unit/sig
  36. endif
  37.  
  38. if exists("b:is_chicken") || exists("is_chicken")
  39.     " improve indenting
  40.     setl iskeyword+=#,%,^
  41.     setl lispwords+=let-optionals,let-optionals*,declare
  42.     setl lispwords+=let-values,let*-values,letrec-values
  43.     setl lispwords+=define-values,opt-lambda,case-lambda,syntax-rules,with-syntax,syntax-case
  44.     setl lispwords+=cond-expand,and-let*,foreign-lambda,foreign-lambda*
  45. endif
  46.  
  47. let b:undo_ftplugin = "setlocal comments< define< formatoptions< iskeyword< lispwords< lisp<"
  48.