ruby.vim 1017 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. " Vim compiler file
  2. " Language: Ruby
  3. " Function: Syntax check and/or error reporting
  4. " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
  5. " URL: https://github.com/vim-ruby/vim-ruby
  6. " Release Coordinator: Doug Kearns <dougkearns@gmail.com>
  7. " Last Change: 2019 Jan 06
  8. if exists("current_compiler")
  9. finish
  10. endif
  11. let current_compiler = "ruby"
  12. if exists(":CompilerSet") != 2 " older Vim always used :setlocal
  13. command -nargs=* CompilerSet setlocal <args>
  14. endif
  15. let s:cpo_save = &cpo
  16. set cpo-=C
  17. " default settings runs script normally
  18. " add '-c' switch to run syntax check only:
  19. "
  20. " CompilerSet makeprg=ruby\ -c
  21. "
  22. " or add '-c' at :make command line:
  23. "
  24. " :make -c %<CR>
  25. "
  26. CompilerSet makeprg=ruby
  27. CompilerSet errorformat=
  28. \%+E%f:%l:\ parse\ error,
  29. \%W%f:%l:\ warning:\ %m,
  30. \%E%f:%l:in\ %*[^:]:\ %m,
  31. \%E%f:%l:\ %m,
  32. \%-C%\t%\\d%#:%#\ %#from\ %f:%l:in\ %.%#,
  33. \%-Z%\t%\\d%#:%#\ %#from\ %f:%l,
  34. \%-Z%p^,
  35. \%-G%.%#
  36. let &cpo = s:cpo_save
  37. unlet s:cpo_save
  38. " vim: nowrap sw=2 sts=2 ts=8: