From hgs at dmu.ac.uk Tue Jan 4 04:41:04 2005 From: hgs at dmu.ac.uk (Hugh Sasse Staff Elec Eng) Date: Tue Jan 4 04:41:15 2005 Subject: The installer again -- further tests. In-Reply-To: <1341958919607.20041218111858@soyabean.com.au> References: <1341958919607.20041218111858@soyabean.com.au> Message-ID: On Sat, 18 Dec 2004, Gavin Sinclair wrote: > Hugh, are you saying I can patch this against the latest CVS and all > will be well? :) I went away for Christmas before reading this. I'm pretty sure I wasn't working from the CVS, I think I should get that. FYI MD5 (vim-ruby-install.rb) = d3c8f86bdb8b6f2e0fac9306dfda85e8 MD5 (vim-ruby-install.rb.orig) = fd2ea32f57d23a47b7bfe3a86d357645 > > Gavin > > I'm still quoting this bit as it is a while since this correspondance.... Hugh > On Saturday, December 18, 2004, 2:37:56 AM, Hugh wrote: > >> I think I have traced the problem to the backup function. >> This seems to be treated as if it is to backup file to file, instead >> of file to directory. When doing an install patched as below I get > >> ruby ./bin/vim-ruby-install.rb > >> Possible Vim installation directories: >> 1) /usr/local/share/vim/vim63 > >> Please select one (or anything else to specify another directory): 1 >> in install: source_path is compiler/ruby.vim >> in install: target_path is >> /usr/local/share/vim/vim63/compiler/ruby.vim >> in backup @base is ./vim-ruby-backup.10788 >> in backup basedir is /usr/local/share/vim/vim63/compiler/ruby.vim >> in backup path is compiler/ruby.vim >> in backup: source is >> /usr/local/share/vim/vim63/compiler/ruby.vim/compiler/ruby.vim >> in backup: target is ./vim-ruby-backup.10788/compiler/ruby.vim >> /usr/local/lib/ruby/1.8/fileutils.rb:859:in `stat': Not a >> directory - >> /usr/local/share/vim/vim63/compiler/ruby.vim/compiler/ruby.vim >> (Errno::ENOTDIR) >> from /usr/local/lib/ruby/1.8/fileutils.rb:859:in `fu_same?' >> from /usr/local/lib/ruby/1.8/fileutils.rb:838:in `fu_each_src_dest' >> from /usr/local/lib/ruby/1.8/fileutils.rb:837:in `fu_each_src_dest0' >> from /usr/local/lib/ruby/1.8/fileutils.rb:837:in `fu_each_src_dest' >> from /usr/local/lib/ruby/1.8/fileutils.rb:333:in `cp' >> from ./bin/vim-ruby-install.rb:303:in `backup' >> from ./bin/vim-ruby-install.rb:261:in `install' >> from ./bin/vim-ruby-install.rb:253:in `each' >> from ./bin/vim-ruby-install.rb:253:in `install' >> from ./bin/vim-ruby-install.rb:252:in `chdir' >> from ./bin/vim-ruby-install.rb:252:in `install' >> from ./bin/vim-ruby-install.rb:384 > > >> I'm not sure which way to fix this: make the code respect backup's >> file to directory semantics or fix backup to be file to file. > >> Hugh > >> --- ./vim-ruby-install.rb.orig 2004-10-27 13:18:10.948557000 +0100 >> +++ ./vim-ruby-install.rb 2004-12-17 15:30:26.634622000 +0000 >> @@ -1,6 +1,7 @@ >> #!/usr/local/bin/ruby > >> # vim-ruby-install: install the Vim config files for Ruby editing >> +# vim:set sw=2 et: >> # >> # * scope out the target directry and get user to confirm >> # * if no directory found, ask user >> @@ -52,6 +53,8 @@ >> # 1. Try the current directory. >> if SOURCE_FILES.all? { |path| FileTest.file?(path) } >> return '.' >> + elsif SOURCE_FILES.map{|f| File.join(File.dirname($0), >> '..',f)}.all? { |path| FileTest.file?(path) } >> + return File.join(File.dirname($0), '..') >> end >> # 2. Try the gem 'vim-ruby'. >> begin >> @@ -231,6 +234,9 @@ >> # will be copied. Both are strings. >> def initialize(source, target) >> @source_dir = source >> + unless FileTest.directory?(@source_dir) >> + raise "Automatically determined source directory >> ('#{@source_dir}') doesn't exist" >> + end >> unless FileTest.directory?(target) >> raise "Chosen target directory ('#{target}') doesn't exist" >> end >> @@ -247,6 +253,8 @@ >> SOURCE_FILES.each do |path| >> source_path = Pathname.new(path) >> target_path = @target_dir[path] >> + puts "in install: source_path is #{source_path.to_s}" >> + puts "in install: target_path is #{target_path.to_s}" >> if target_path.file? and target_path.mtime > source_path.mtime >> # We're going to overwrite a newer file; back it up, unless they're the same. >> unless _same_contents?(target_path, source_path) >> @@ -283,10 +291,15 @@ >> end >> # Copy basedir/path to @path/path. >> def backup(basedir, path) >> + puts "in backup @base is #{@base}" >> + puts "in backup basedir is #{basedir}" >> + puts "in backup path is #{path}" >> @base.mkpath unless @base.directory? >> source = Pathname.new(basedir) + path >> target = @base + path >> target.dirname.mkpath >> + puts "in backup: source is #{source.to_s}" >> + puts "in backup: target is #{target.to_s}" >> FileUtils.cp(source.to_s, target.to_s) >> end >> def [](path) >> @@ -366,6 +379,7 @@ >> op.parse!(ARGV) > >> source_dir = Env.determine_source_directory >> +if source_dir.nil? then raise "source_dir is Nil"; end >> target_dir = $options[:target_dir] || >> TargetDirectory.finder.find_target_directory >> VimRubyInstaller.new(source_dir, target_dir).install > > > > > > _______________________________________________ > vim-ruby-devel mailing list > vim-ruby-devel@rubyforge.org > http://rubyforge.org/mailman/listinfo/vim-ruby-devel > From hgs at dmu.ac.uk Tue Jan 4 06:29:06 2005 From: hgs at dmu.ac.uk (Hugh Sasse Staff Elec Eng) Date: Tue Jan 4 06:27:16 2005 Subject: The installer again -- further tests. In-Reply-To: References: <1341958919607.20041218111858@soyabean.com.au> Message-ID: OK, here is the diff with the extra diagnostic print statements removed. this is against the CVS as grabbed with wget from http://rubyforge.org/cgi-bin/viewcvs.cgi/vim-ruby/bin/vim-ruby-install.rb?cvsroot=vim-ruby today. You don't need to worry about the change from env ruby on the first line of course... Hugh --- vim-ruby-install.rb?rev=1.1&cvsroot=vim-ruby 2005-01-04 11:13:23.648722000 +0000 +++ vim-ruby-install.rb.new 2005-01-04 11:22:34.639925000 +0000 @@ -1,6 +1,7 @@ -#!/usr/bin/env ruby +#!/usr/local/bin/ruby # vim-ruby-install: install the Vim config files for Ruby editing +# vim:set sw=2 et: # # * scope out the target directry and get user to confirm # * if no directory found, ask user @@ -52,6 +53,8 @@ # 1. Try the current directory. if SOURCE_FILES.all? { |path| FileTest.file?(path) } return '.' + elsif SOURCE_FILES.map{|f| File.join(File.dirname($0), '..',f)}.all? { |path| FileTest.file?(path) } + return File.join(File.dirname($0), '..') end # 2. Try the gem 'vim-ruby'. begin @@ -231,6 +233,9 @@ # will be copied. Both are strings. def initialize(source, target) @source_dir = source + unless FileTest.directory?(@source_dir) + raise "Automatically determined source directory ('#{@source_dir}') doesn't exist" + end unless FileTest.directory?(target) raise "Chosen target directory ('#{target}') doesn't exist" end @@ -366,6 +371,7 @@ op.parse!(ARGV) source_dir = Env.determine_source_directory +if source_dir.nil? then raise "source_dir is Nil"; end target_dir = $options[:target_dir] || TargetDirectory.finder.find_target_directory VimRubyInstaller.new(source_dir, target_dir).install From tilman at code-monkey.de Tue Feb 8 14:31:48 2005 From: tilman at code-monkey.de (Tilman Sauerbeck) Date: Tue Feb 8 14:27:42 2005 Subject: [PATCH] Improved iterator matching, show whitespace errors Message-ID: <20050208193148.GA3293@code-monkey.de> Hi, I sent these two patches to Doug Kearns 1-2 weeks ago, but I didn't get any feedback, so I'm posting them here now :) ruby.vim-iterator.diff improves the regex for iterators, so that it now correctly recognizes and hilights |(foo, bar)| for example. The 2nd patch makes it possible to have vim hilight whitespace errors such as trailing whitespace or mixed tabs/spaces. The regular expressions were copied from c.vim. Please comment ;) -- Regards, Tilman -------------- next part -------------- Index: syntax/ruby.vim =================================================================== RCS file: /var/cvs/vim-ruby/vim-ruby/syntax/ruby.vim,v retrieving revision 1.39 diff -u -r1.39 ruby.vim --- syntax/ruby.vim 27 Nov 2004 14:44:37 -0000 1.39 +++ syntax/ruby.vim 29 Jan 2005 21:13:33 -0000 @@ -59,7 +59,7 @@ syn match rubySymbol ":\@_,;:!?/.'"@$*\&+0]\)" syn match rubySymbol ":\@?@\_`~1-9]# syn match rubyPredefinedVariable "$-[0FIKadilpvw]" display -------------- next part -------------- Index: syntax/ruby.vim =================================================================== RCS file: /var/cvs/vim-ruby/vim-ruby/syntax/ruby.vim,v retrieving revision 1.39 diff -u -r1.39 ruby.vim --- syntax/ruby.vim 27 Nov 2004 14:44:37 -0000 1.39 +++ syntax/ruby.vim 1 Feb 2005 20:11:09 -0000 @@ -28,6 +28,15 @@ setlocal foldmethod=syntax endif +if exists("ruby_space_errors") + if !exists("ruby_no_trail_space_error") + syn match rubySpaceError display excludenl "\s\+$" + endif + if !exists("ruby_no_tab_space_error") + syn match rubySpaceError display " \+\t"me=e-1 + endif +endif + " Expression Substitution and Backslash Notation syn match rubyEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display syn match rubyEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display @@ -184,8 +193,8 @@ " Comments and Documentation syn match rubySharpBang "\%^#!.*" display syn keyword rubyTodo FIXME NOTE TODO XXX contained -syn match rubyComment "#.*" contains=rubySharpBang,rubyTodo,@Spell -syn region rubyDocumentation start="^=begin" end="^=end.*$" contains=rubyTodo,@Spell fold +syn match rubyComment "#.*" contains=rubySharpBang,rubyTodo,rubySpaceError,@Spell +syn region rubyDocumentation start="^=begin" end="^=end.*$" contains=rubyTodo,rubySpaceError,@Spell fold " Note: this is a hack to prevent 'keywords' being highlighted as such when called as methods syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE @@ -254,6 +263,8 @@ HiLink rubyStringDelimiter Delimiter HiLink rubyString String HiLink rubyTodo Todo + HiLink rubySpaceError rubyError + HiLink rubyError Error delcommand HiLink endif From hgs at dmu.ac.uk Wed Feb 23 12:55:50 2005 From: hgs at dmu.ac.uk (Hugh Sasse Staff Elec Eng) Date: Wed Feb 23 12:52:42 2005 Subject: eruby and vim: rhtml Message-ID: Has anyone done any work on making vim pick up .rhtml files and procesing the syntax correctly? I'm not even sure if you can say "use ruby syntax highlighting between <% and %> and use html ouside it". Hugh From tilman at code-monkey.de Sun Feb 27 07:58:48 2005 From: tilman at code-monkey.de (Tilman Sauerbeck) Date: Sun Feb 27 07:53:40 2005 Subject: eruby and vim: rhtml In-Reply-To: References: Message-ID: <20050227125848.GA16043@code-monkey.de> Hugh Sasse Staff Elec Eng [2005-02-23 17:55]: > Has anyone done any work on making vim pick up .rhtml files > and procesing the syntax correctly? I'm not even sure if you can > say "use ruby syntax highlighting between <% and %> and use html > ouside it". Sure you can! Search the scripts section on vim.org for "eruby.vim" :) -- Regards, Tilman From hgs at dmu.ac.uk Mon Feb 28 05:10:40 2005 From: hgs at dmu.ac.uk (Hugh Sasse Staff Elec Eng) Date: Mon Feb 28 05:08:29 2005 Subject: eruby and vim: rhtml In-Reply-To: <20050227125848.GA16043@code-monkey.de> References: <20050227125848.GA16043@code-monkey.de> Message-ID: On Sun, 27 Feb 2005, Tilman Sauerbeck wrote: > Hugh Sasse Staff Elec Eng [2005-02-23 17:55]: >> Has anyone done any work on making vim pick up .rhtml files >> and procesing the syntax correctly? I'm not even sure if you can [...] > Sure you can! Search the scripts section on vim.org for "eruby.vim" :) Thank you, I'll take a look. > > -- > Regards, > Tilman Hugh From ken.miller at gmail.com Wed Mar 23 15:23:55 2005 From: ken.miller at gmail.com (Ken Miller) Date: Wed Mar 23 15:19:04 2005 Subject: Patch for nested brackets in strings Message-ID: Hi, Doing some metaprogramming, I noticed that nested brackets in generalized string literals are not handled correctly. Here's the code that triggered it: (1..12).each do |index| monthname = Date::MONTHNAMES[index] class_eval %{ def test_#{monthname.downcase} MONTHS.each_pair do |key, value| assert_equal(value[#{index}],@days[key].select { |a| a.month == #{index} }.length, "Wrong number of days in #{monthname.capitalize}, \#{key}") end end } end Ruby detects and skips over nested delimiters, but the syntax code doesn't. I approach vim syntax with some fear, but the attached patch appears to fix the problem, and to the extent of my testing (vim 6.3 windows) does not introduce any unwanted behavior. To apply the patch, cd to syntax directory and run patch ruby.vim nested-brackets.patch Thanks for the existing work! Ken -------------- next part -------------- A non-text attachment was scrubbed... Name: nested-brackets.patch Type: application/octet-stream Size: 1397 bytes Desc: not available Url : http://rubyforge.org/pipermail/vim-ruby-devel/attachments/20050323/35727144/nested-brackets.obj From gsinclair at soyabean.com.au Wed Mar 23 17:10:46 2005 From: gsinclair at soyabean.com.au (Gavin Sinclair) Date: Wed Mar 23 17:06:36 2005 Subject: eruby and vim: rhtml In-Reply-To: <20050227125848.GA16043@code-monkey.de> References: <20050227125848.GA16043@code-monkey.de> Message-ID: <87780582508.20050324091046@soyabean.com.au> On Sunday, February 27, 2005, 11:58:48 PM, Tilman wrote: > Hugh Sasse Staff Elec Eng [2005-02-23 17:55]: >> Has anyone done any work on making vim pick up .rhtml files >> and procesing the syntax correctly? I'm not even sure if you can >> say "use ruby syntax highlighting between <% and %> and use html >> ouside it". > Sure you can! Search the scripts section on vim.org for "eruby.vim" :) I tried that and didn't see any improvement after installing it. Is there some trick I've missed? Gavin From gsinclair at soyabean.com.au Wed Mar 23 17:35:44 2005 From: gsinclair at soyabean.com.au (Gavin Sinclair) Date: Wed Mar 23 17:32:36 2005 Subject: [PATCH] Improved iterator matching, show whitespace errors In-Reply-To: <20050208193148.GA3293@code-monkey.de> References: <20050208193148.GA3293@code-monkey.de> Message-ID: <15782080021.20050324093544@soyabean.com.au> On Wednesday, February 9, 2005, 6:31:48 AM, Tilman wrote: > Hi, > I sent these two patches to Doug Kearns 1-2 weeks ago, but I didn't get > any feedback, so I'm posting them here now :) > ruby.vim-iterator.diff improves the regex for iterators, so that it now > correctly recognizes and hilights |(foo, bar)| for example. > The 2nd patch makes it possible to have vim hilight whitespace errors > such as trailing whitespace or mixed tabs/spaces. > The regular expressions were copied from c.vim. > Please comment ;) Sorry for the delay in replying, Tilman, and thanks for the contribution. I'll add the iterator patch to CVS now, but I'll leave the whitespace patch to Doug, as it might require some tailoring and documentation. Do people think that whitespace errors should be turned on by default? Gavin From gsinclair at soyabean.com.au Wed Mar 23 19:43:59 2005 From: gsinclair at soyabean.com.au (Gavin Sinclair) Date: Wed Mar 23 20:01:22 2005 Subject: Patch for nested brackets in strings In-Reply-To: References: Message-ID: <166789774916.20050324114359@soyabean.com.au> On Thursday, March 24, 2005, 7:23:55 AM, Ken wrote, in part: > Ruby detects and skips over nested delimiters, but the syntax code doesn't. > [...] > patch ruby.vim nested-brackets.patch Thanks a lot, Ken. It's applied to CVS. Note to others: Ken also sent me privately a patch to improve indenting of nested delimiters. The ChangeLog for today reads: * syntax/ruby.vim: Improved hilighting of %{...} strings with nested brackets (Ken Miller). * indent/ruby.vim: Improved indenting of %{...} strings with nested brackets (Ken Miller). * syntax/ruby.vim: Corrected hilighting of |(x,y)| iterator parameters (Tilman Sauerbeck). Cheers, Gavin From tilman at code-monkey.de Fri Mar 25 04:28:56 2005 From: tilman at code-monkey.de (Tilman Sauerbeck) Date: Fri Mar 25 04:24:05 2005 Subject: [PATCH] Improved iterator matching, show whitespace errors In-Reply-To: <15782080021.20050324093544@soyabean.com.au> References: <20050208193148.GA3293@code-monkey.de> <15782080021.20050324093544@soyabean.com.au> Message-ID: <20050325092856.GA7674@code-monkey.de> Gavin Sinclair [2005-03-24 09:35]: > On Wednesday, February 9, 2005, 6:31:48 AM, Tilman wrote: > > > The 2nd patch makes it possible to have vim hilight whitespace errors > > such as trailing whitespace or mixed tabs/spaces. > > The regular expressions were copied from c.vim. > > [...] > > Do people think that whitespace errors should be turned on by default? The default settings should be 'sane' for most people, and reading code with lots of trailing whitespace can be quite annoying when it's hilighted. So I'd say the default should be to turn hilighting off. -- Regards, Tilman From tilman at code-monkey.de Fri Mar 25 04:31:35 2005 From: tilman at code-monkey.de (Tilman Sauerbeck) Date: Fri Mar 25 04:26:41 2005 Subject: eruby and vim: rhtml In-Reply-To: <87780582508.20050324091046@soyabean.com.au> References: <20050227125848.GA16043@code-monkey.de> <87780582508.20050324091046@soyabean.com.au> Message-ID: <20050325093135.GB7674@code-monkey.de> Gavin Sinclair [2005-03-24 09:10]: > On Sunday, February 27, 2005, 11:58:48 PM, Tilman wrote: > > > Hugh Sasse Staff Elec Eng [2005-02-23 17:55]: > >> Has anyone done any work on making vim pick up .rhtml files > >> and procesing the syntax correctly? I'm not even sure if you can > >> say "use ruby syntax highlighting between <% and %> and use html > >> ouside it". > > > Sure you can! Search the scripts section on vim.org for "eruby.vim" :) > > I tried that and didn't see any improvement after installing it. Is > there some trick I've missed? You either need to set the syntax to "eruby" manually, or use the following autocommand: au BufNewFile,BufRead *.rhtml set syn=eruby -- Regards, Tilman From gsinclair at soyabean.com.au Fri Mar 25 07:39:18 2005 From: gsinclair at soyabean.com.au (Gavin Sinclair) Date: Fri Mar 25 07:41:14 2005 Subject: eruby and vim: rhtml In-Reply-To: <20050325093135.GB7674@code-monkey.de> References: <20050227125848.GA16043@code-monkey.de> <87780582508.20050324091046@soyabean.com.au> <20050325093135.GB7674@code-monkey.de> Message-ID: <111919094407.20050325233918@soyabean.com.au> On Friday, March 25, 2005, 8:31:35 PM, Tilman wrote: >> > Sure you can! Search the scripts section on vim.org for "eruby.vim" :) >> >> I tried that and didn't see any improvement after installing it. Is >> there some trick I've missed? > You either need to set the syntax to "eruby" manually [...] When I do that, the strings <%, <%=, and %> get highlighted with a yellow background, as if they're errors or something. Do you get a similar effect? BTW, did you know that eruby files can be marked up more simply?
    % for name in names
  • %= name
  • % end
Something like that anyway. Much nicer to my eyes, but rarely seen. It requires a special flag to eruby. Gavin From dougkearns at gmail.com Tue Mar 29 23:06:26 2005 From: dougkearns at gmail.com (Doug Kearns) Date: Tue Mar 29 23:04:24 2005 Subject: Slack syntax file maintainer Message-ID: <20050330040626.GK3884@localhost.localdomain> Hello all, Apologies for my absence - I've been away in the boondocks (generally without net access) all year so have been a little slack in integrating the patches people have contributed. I'll start working through them tonight. Gavin, have I missed anything relevant on ruby-talk during the last few months that you can remember? I did a quick search but didn't turn up anything of note... Thanks, Doug From dougkearns at gmail.com Tue Mar 29 23:09:03 2005 From: dougkearns at gmail.com (Doug Kearns) Date: Tue Mar 29 23:06:57 2005 Subject: eruby and vim: rhtml In-Reply-To: <20050325093135.GB7674@code-monkey.de> References: <20050227125848.GA16043@code-monkey.de> <87780582508.20050324091046@soyabean.com.au> <20050325093135.GB7674@code-monkey.de> Message-ID: <20050330040903.GL3884@localhost.localdomain> On Fri, Mar 25, 2005 at 10:31:35AM +0100, Tilman Sauerbeck wrote: > Gavin Sinclair [2005-03-24 09:10]: > > On Sunday, February 27, 2005, 11:58:48 PM, Tilman wrote: > > > > > Hugh Sasse Staff Elec Eng [2005-02-23 17:55]: > > >> Has anyone done any work on making vim pick up .rhtml files > > >> and procesing the syntax correctly? I'm not even sure if you can > > >> say "use ruby syntax highlighting between <% and %> and use html > > >> ouside it". > > > > > Sure you can! Search the scripts section on vim.org for "eruby.vim" :) > > > > I tried that and didn't see any improvement after installing it. Is > > there some trick I've missed? > > You either need to set the syntax to "eruby" manually, or use the > following autocommand: > > au BufNewFile,BufRead *.rhtml set syn=eruby I'll add this to filetype.vim and send it upstream. Regards, Doug From gsinclair at soyabean.com.au Wed Mar 30 02:44:13 2005 From: gsinclair at soyabean.com.au (Gavin Sinclair) Date: Wed Mar 30 02:39:28 2005 Subject: Slack syntax file maintainer In-Reply-To: <20050330040626.GK3884@localhost.localdomain> References: <20050330040626.GK3884@localhost.localdomain> Message-ID: <6629831144.20050330174413@soyabean.com.au> On Wednesday, March 30, 2005, 2:06:26 PM, Doug wrote: > Hello all, > Apologies for my absence - I've been away in the boondocks (generally > without net access) all year so have been a little slack in integrating > the patches people have contributed. I'll start working through them > tonight. > Gavin, have I missed anything relevant on ruby-talk during the last few > months that you can remember? I did a quick search but didn't turn up > anything of note... I've been only an occasional reader of ruby-talk these last few months myself, but haven't seen anything. Didn't occur to me to search... On the syntax note, should we include the definition for eruby files in our package? Gavin From dougkearns at gmail.com Wed Mar 30 06:31:15 2005 From: dougkearns at gmail.com (Doug Kearns) Date: Wed Mar 30 06:32:11 2005 Subject: Slack syntax file maintainer In-Reply-To: <6629831144.20050330174413@soyabean.com.au> References: <20050330040626.GK3884@localhost.localdomain> <6629831144.20050330174413@soyabean.com.au> Message-ID: <20050330113115.GR3884@localhost.localdomain> On Wed, Mar 30, 2005 at 05:44:13PM +1000, Gavin Sinclair wrote: > On the syntax note, should we include the definition for eruby files > in our package? I guess we should if Michael is willing to come on-board or donate it. Regards, Doug From gsinclair at soyabean.com.au Wed Mar 30 09:00:57 2005 From: gsinclair at soyabean.com.au (Gavin Sinclair) Date: Wed Mar 30 08:56:15 2005 Subject: vim-ruby syntax problem In-Reply-To: References: Message-ID: <16452435558.20050331000057@soyabean.com.au> [Forwarded from Kent Siblev] The latest change to the syntax/ruby.vim rev1.40 brakes parsing to the following code: str = "test < test" def test end After the string parsing is broken. From dougkearns at gmail.com Wed Mar 30 09:32:31 2005 From: dougkearns at gmail.com (Doug Kearns) Date: Wed Mar 30 09:31:10 2005 Subject: [PATCH] Improved iterator matching, show whitespace errors In-Reply-To: <20050208193148.GA3293@code-monkey.de> References: <20050208193148.GA3293@code-monkey.de> Message-ID: <20050330143231.GA454@localhost.localdomain> On Tue, Feb 08, 2005 at 08:31:48PM +0100, Tilman Sauerbeck wrote: > Hi, > I sent these two patches to Doug Kearns 1-2 weeks ago, but I didn't get > any feedback, so I'm posting them here now :) > > ruby.vim-iterator.diff improves the regex for iterators, so that it now > correctly recognizes and hilights |(foo, bar)| for example. > Index: syntax/ruby.vim > =================================================================== > RCS file: /var/cvs/vim-ruby/vim-ruby/syntax/ruby.vim,v > retrieving revision 1.39 > diff -u -r1.39 ruby.vim > --- syntax/ruby.vim 27 Nov 2004 14:44:37 -0000 1.39 > +++ syntax/ruby.vim 29 Jan 2005 21:13:33 -0000 > @@ -59,7 +59,7 @@ > syn match rubySymbol ":\@_,;:!?/.'"@$*\&+0]\)" > syn match rubySymbol ":\@ syn region rubySymbol start=":\@ - syn match rubyIterator "|[ ,a-zA-Z0-9_*]\+|" display > + syn match rubyIterator "|[ ,a-zA-Z0-9_*()]\+|" display What if we make it a little more constrained with something like: syn match rubyIterator "|[ ,a-zA-Z0-9_*]\+|" display syn match rubyIterator "|\s*(\s*[ ,a-zA-Z0-9_*]\+\s*)\s*|" display > syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\_`~1-9]# > syn match rubyPredefinedVariable "$-[0FIKadilpvw]" display Regards, Doug From ken.miller at gmail.com Wed Mar 30 13:52:51 2005 From: ken.miller at gmail.com (Ken Miller) Date: Wed Mar 30 13:47:47 2005 Subject: vim-ruby syntax problem In-Reply-To: <16452435558.20050331000057@soyabean.com.au> References: <16452435558.20050331000057@soyabean.com.au> Message-ID: Hmm, that would be a side effect of my fix for nested delimeters. They shouldn't apply to normal strings. I'll make a patch. K On Thu, 31 Mar 2005 00:00:57 +1000, Gavin Sinclair wrote: > [Forwarded from Kent Siblev] > > The latest change to the syntax/ruby.vim rev1.40 brakes parsing to the > following code: > > str = "test < test" > > def test > end > > After the string parsing is broken. > > _______________________________________________ > vim-ruby-devel mailing list > vim-ruby-devel@rubyforge.org > http://rubyforge.org/mailman/listinfo/vim-ruby-devel > From ken.miller at gmail.com Wed Mar 30 14:23:24 2005 From: ken.miller at gmail.com (Ken Miller) Date: Wed Mar 30 14:18:17 2005 Subject: vim-ruby syntax problem In-Reply-To: References: <16452435558.20050331000057@soyabean.com.au> Message-ID: OK. It's more correct all around. It now only recognizes nested characters that match the string delimeters themselves, so %< ... > only counts angle bracket pairs, and " ... " doesn't count at all. K On Wed, 30 Mar 2005 10:52:51 -0800, Ken Miller wrote: > Hmm, that would be a side effect of my fix for nested delimeters. > They shouldn't apply to normal strings. I'll make a patch. > > K > > > On Thu, 31 Mar 2005 00:00:57 +1000, Gavin Sinclair > wrote: > > [Forwarded from Kent Siblev] > > > > The latest change to the syntax/ruby.vim rev1.40 brakes parsing to the > > following code: > > > > str = "test < test" > > > > def test > > end > > > > After the string parsing is broken. > > > > _______________________________________________ > > vim-ruby-devel mailing list > > vim-ruby-devel@rubyforge.org > > http://rubyforge.org/mailman/listinfo/vim-ruby-devel > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: indent.patch Type: application/octet-stream Size: 1566 bytes Desc: not available Url : http://rubyforge.org/pipermail/vim-ruby-devel/attachments/20050330/2ca5c99b/indent.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: syntax.patch Type: application/octet-stream Size: 6581 bytes Desc: not available Url : http://rubyforge.org/pipermail/vim-ruby-devel/attachments/20050330/2ca5c99b/syntax.obj From ken.miller at gmail.com Wed Mar 30 14:39:54 2005 From: ken.miller at gmail.com (Ken Miller) Date: Wed Mar 30 14:34:49 2005 Subject: vim-ruby syntax problem In-Reply-To: References: <16452435558.20050331000057@soyabean.com.au> Message-ID: Take two on the indent patch. On Wed, 30 Mar 2005 11:23:24 -0800, Ken Miller wrote: > OK. It's more correct all around. It now only recognizes nested > characters that match the string delimeters themselves, so %< ... > > only counts angle bracket pairs, and " ... " doesn't count at all. > > K > > On Wed, 30 Mar 2005 10:52:51 -0800, Ken Miller wrote: > > Hmm, that would be a side effect of my fix for nested delimeters. > > They shouldn't apply to normal strings. I'll make a patch. > > > > K > > > > > > On Thu, 31 Mar 2005 00:00:57 +1000, Gavin Sinclair > > wrote: > > > [Forwarded from Kent Siblev] > > > > > > The latest change to the syntax/ruby.vim rev1.40 brakes parsing to the > > > following code: > > > > > > str = "test < test" > > > > > > def test > > > end > > > > > > After the string parsing is broken. > > > > > > _______________________________________________ > > > vim-ruby-devel mailing list > > > vim-ruby-devel@rubyforge.org > > > http://rubyforge.org/mailman/listinfo/vim-ruby-devel > > > > > > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: indent.patch Type: application/octet-stream Size: 1602 bytes Desc: not available Url : http://rubyforge.org/pipermail/vim-ruby-devel/attachments/20050330/1f107199/indent.obj From ken.miller at gmail.com Wed Mar 30 16:40:05 2005 From: ken.miller at gmail.com (Ken Miller) Date: Wed Mar 30 16:35:00 2005 Subject: vim-ruby syntax problem In-Reply-To: <16452435558.20050331000057@soyabean.com.au> References: <16452435558.20050331000057@soyabean.com.au> Message-ID: Last time, I swear. It was injecting bad behavior into class and def blocks. Someone else should verify it's working before the commit. K -------------- next part -------------- A non-text attachment was scrubbed... Name: syntax.patch Type: application/octet-stream Size: 9780 bytes Desc: not available Url : http://rubyforge.org/pipermail/vim-ruby-devel/attachments/20050330/2d4d2d0d/syntax-0001.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: indent.patch Type: application/octet-stream Size: 1602 bytes Desc: not available Url : http://rubyforge.org/pipermail/vim-ruby-devel/attachments/20050330/2d4d2d0d/indent-0001.obj