Add support for :winpos
[MacVim.git] / runtime / compiler / ruby.vim
blobff3b3c702c0881a44e23e159cf8322fc1118e6bf
1 " Vim compiler file
2 " Language:             Ruby
3 " Function:             Syntax check and/or error reporting
4 " Maintainer:           Tim Hammerquist <timh at rubyforge.org>
5 " Info:                 $Id: ruby.vim,v 1.13 2008/06/29 04:18:43 tpope Exp $
6 " URL:                  http://vim-ruby.rubyforge.org
7 " Anon CVS:             See above site
8 " Release Coordinator:  Doug Kearns <dougkearns@gmail.com>
9 " ----------------------------------------------------------------------------
11 " Changelog:
12 " 0.2:  script saves and restores 'cpoptions' value to prevent problems with
13 "       line continuations
14 " 0.1:  initial release
16 " Contributors:
17 "   Hugh Sasse <hgs@dmu.ac.uk>
18 "   Doug Kearns <djkea2@gus.gscit.monash.edu.au>
20 " Todo:
21 "   match error type %m
23 " Comments:
24 "   I know this file isn't perfect.  If you have any questions, suggestions,
25 "   patches, etc., please don't hesitate to let me know.
27 "   This is my first experience with 'errorformat' and compiler plugins and
28 "   I welcome any input from more experienced (or clearer-thinking)
29 "   individuals.
30 " ----------------------------------------------------------------------------
32 if exists("current_compiler")
33   finish
34 endif
35 let current_compiler = "ruby"
37 if exists(":CompilerSet") != 2          " older Vim always used :setlocal
38   command -nargs=* CompilerSet setlocal <args>
39 endif
41 let s:cpo_save = &cpo
42 set cpo-=C
44 " default settings runs script normally
45 " add '-c' switch to run syntax check only:
47 "   CompilerSet makeprg=ruby\ -wc\ $*
49 " or add '-c' at :make command line:
51 "   :make -c %<CR>
53 CompilerSet makeprg=ruby\ -w\ $*
55 CompilerSet errorformat=
56     \%+E%f:%l:\ parse\ error,
57     \%W%f:%l:\ warning:\ %m,
58     \%E%f:%l:in\ %*[^:]:\ %m,
59     \%E%f:%l:\ %m,
60     \%-C%\tfrom\ %f:%l:in\ %.%#,
61     \%-Z%\tfrom\ %f:%l,
62     \%-Z%p^,
63     \%-G%.%#
65 let &cpo = s:cpo_save
66 unlet s:cpo_save
68 " vim: nowrap sw=2 sts=2 ts=8: