scheme.vim 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. " Vim filetype plugin file
  2. " Language: Scheme (R7RS)
  3. " Last Change: 2019-11-19
  4. " Author: Evan Hanson <evhan@foldling.org>
  5. " Maintainer: Evan Hanson <evhan@foldling.org>
  6. " Previous Maintainer: Sergey Khorev <sergey.khorev@gmail.com>
  7. " Repository: https://git.foldling.org/vim-scheme.git
  8. " URL: https://foldling.org/vim/ftplugin/scheme.vim
  9. if exists('b:did_ftplugin')
  10. finish
  11. endif
  12. let s:cpo = &cpo
  13. set cpo&vim
  14. setl lisp
  15. setl comments=:;;;;,:;;;,:;;,:;,sr:#\|,mb:\|,ex:\|#
  16. setl commentstring=;%s
  17. setl define=^\\s*(def\\k*
  18. setl iskeyword=33,35-39,42-43,45-58,60-90,94,95,97-122,126
  19. let b:undo_ftplugin = 'setl lisp< comments< commentstring< define< iskeyword<'
  20. setl lispwords+=case
  21. setl lispwords+=define
  22. setl lispwords+=define-record-type
  23. setl lispwords+=define-syntax
  24. setl lispwords+=define-values
  25. setl lispwords+=do
  26. setl lispwords+=guard
  27. setl lispwords+=lambda
  28. setl lispwords+=let
  29. setl lispwords+=let*
  30. setl lispwords+=let*-values
  31. setl lispwords+=let-syntax
  32. setl lispwords+=let-values
  33. setl lispwords+=letrec
  34. setl lispwords+=letrec*
  35. setl lispwords+=letrec-syntax
  36. setl lispwords+=parameterize
  37. setl lispwords+=set!
  38. setl lispwords+=syntax-rules
  39. setl lispwords+=unless
  40. setl lispwords+=when
  41. let b:undo_ftplugin = b:undo_ftplugin . ' lispwords<'
  42. let b:did_scheme_ftplugin = 1
  43. if exists('b:is_chicken') || exists('g:is_chicken')
  44. runtime! ftplugin/chicken.vim
  45. endif
  46. unlet b:did_scheme_ftplugin
  47. let b:did_ftplugin = 1
  48. let &cpo = s:cpo
  49. unlet s:cpo