PATCH: new eruby compiler plugin
Doug Kearns
dougkearns at gmail.com
Thu Sep 1 12:33:04 EDT 2005
Here's a first cut at a compiler plugin for eruby. I suppose we should
support erb as well, or perhaps instead?
It's not particularly useful yet. ;-)
Regards,
Doug
Index: bin/vim-ruby-install.rb
===================================================================
RCS file: /var/cvs/vim-ruby/vim-ruby/bin/vim-ruby-install.rb,v
retrieving revision 1.9
diff -u -r1.9 vim-ruby-install.rb
--- bin/vim-ruby-install.rb 27 Aug 2005 15:05:42 -0000 1.9
+++ bin/vim-ruby-install.rb 1 Sep 2005 16:30:12 -0000
@@ -18,6 +18,7 @@
require 'pathname'
SOURCE_FILES = %w{
+ compiler/eruby.vim
compiler/ruby.vim
compiler/rubyunit.vim
ftdetect/ruby.vim
Index: compiler/eruby.vim
===================================================================
RCS file: compiler/eruby.vim
diff -N compiler/eruby.vim
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ compiler/eruby.vim 1 Sep 2005 16:30:12 -0000
@@ -0,0 +1,35 @@
+" Vim compiler file
+" Language: eRuby
+" Maintainer: Doug Kearns <djkea2 at gus.gscit.monash.edu.au>
+" Info: $Id$
+" URL: http://vim-ruby.sourceforge.net
+" Anon CVS: See above site
+" Licence: GPL (http://www.gnu.org)
+" Disclaimer:
+" This program is distributed in the hope that it will be useful,
+" but WITHOUT ANY WARRANTY; without even the implied warranty of
+" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+" GNU General Public License for more details.
+" ----------------------------------------------------------------------------
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "rubyunit"
+
+if exists(":CompilerSet") != 2 " older Vim always used :setlocal
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+let s:cpo_save = &cpo
+set cpo-=C
+
+CompilerSet makeprg=eruby
+
+CompilerSet errorformat=%E%f:%l:%m,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
+" vim: nowrap ts=8 ff=unix
More information about the vim-ruby-devel
mailing list