Bugs: Browse | Submit New | Admin

[#10864] Problem with single line comments/she-bang matching regexp

Date:
2007-05-16 09:00
Priority:
3
Submitted By:
Guillaume Laville (guiguilinux)
Assigned To:
Doug Kearns (dkearns)
Category:
Syntax
State:
Open
Summary:
Problem with single line comments/she-bang matching regexp

Detailed description
Hello

In my vim 7.1 fresh install, I encounters a strange highlighting problem with Ruby syntax, when I type the following
code in a fresh hello.rb file in one pass :

#!/usr/bin/env ruby

def hello
  puts "hello"
end

The shebang (or comment, same behaviour) is coloured as expected,
but the following lines remains black, seeming to be ignored,
until you went back for changing something in content...

The problem seems to be that "rubyComment" token in ruby.vim has a too permissive matching regex, which doesn't
require a end of line at the end : Since I added "\n" at the end of the expression, issue disappear anymore
and after testing a bunch of other source codes, this correction doesn't seem to break another part...

This issue shoud concern current CVS version too, as mentionned line was no modified since vim 7.1 ruby.vim one : Does
someone has same problem, and if the issue is not specific to me, could you apply my patch ?

Thanks, please excuse me for my poor english (I'm not a native speaker) and the errors I may have done in this first
bug report, and have a good day ;-)

Add A Comment: Notepad

Please login


Followup

Message
Date: 2007-05-16 10:17
Sender: Guillaume Laville

I didn't expected a response so quick :)

BTW, thanks for you excellent work in ruby support for vim,
I use it everyday : As you said, that's a litte and easy to
work-around issue, no problem if it has to wait a little to
be fixed, it's just one instance of "minor problem but
annoying once discovered" ^^
Date: 2007-05-16 09:46
Sender: Doug Kearns

G'day Guillaume,

Thanks for the report.  This appears to be a syncing problem
resulting from the multiline comment folding and as a result
should occur after every comment not just a shebang line.  I'm
away at the moment so won't be able to fix this for a week or
so but until then you can simply hit Ctrl-l to redraw the screen
or set ruby_no_comment_fold = 1 in your vimrc.

Thanks,
Doug
Date: 2007-05-16 09:06
Sender: Guillaume Laville

I just saw two mistakes leading to wrong comprehension,
sorry for these :

s/anymore//g
s/disappear/disappeared/g

Attached Files:

Name Description Download
ruby.vim.diff Diff between original and my custom ruby.vim Download

Changes:

Field Old Value Date By
File Added1999: ruby.vim.diff2007-05-16 09:00guiguilinux