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