From gsinclair at soyabean.com.au Fri Apr 1 04:55:47 2005 From: gsinclair at soyabean.com.au (Gavin Sinclair) Date: Fri Apr 1 04:51:53 2005 Subject: eruby and vim: rhtml In-Reply-To: <111919094407.20050325233918@soyabean.com.au> References: <20050227125848.GA16043@code-monkey.de> <87780582508.20050324091046@soyabean.com.au> <20050325093135.GB7674@code-monkey.de> <111919094407.20050325233918@soyabean.com.au> Message-ID: <161210525439.20050401195547@soyabean.com.au> On Friday, March 25, 2005, 10:39:18 PM, Gavin wrote: > 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? Anyone? That yellow background is annoying, and I'm selfishly asking someone to investigate. (I'll understand if there are no responses... :) Gavin From dougkearns at gmail.com Fri Apr 1 05:21:06 2005 From: dougkearns at gmail.com (Doug Kearns) Date: Fri Apr 1 05:20:51 2005 Subject: eruby and vim: rhtml In-Reply-To: <161210525439.20050401195547@soyabean.com.au> References: <20050227125848.GA16043@code-monkey.de> <87780582508.20050324091046@soyabean.com.au> <20050325093135.GB7674@code-monkey.de> <111919094407.20050325233918@soyabean.com.au> <161210525439.20050401195547@soyabean.com.au> Message-ID: <20050401102106.GF454@localhost.localdomain> On Fri, Apr 01, 2005 at 07:55:47PM +1000, Gavin Sinclair wrote: > On Friday, March 25, 2005, 10:39:18 PM, Gavin wrote: > > > 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? > > Anyone? That yellow background is annoying, and I'm selfishly asking > someone to investigate. It's because the erubyRubyDelim syntax group is linked against the TODO highlight group. See line 35. You can change this by adding a line to a ~/.vim/after/syntax/eruby.vim file such as: hi link erubyRubyDelim XXX where XXX is any of the highlight groups specified under :help group-name > (I'll understand if there are no responses... :) At least you're self-aware. ;-) Regards, Doug From gsinclair at soyabean.com.au Fri Apr 1 06:27:36 2005 From: gsinclair at soyabean.com.au (Gavin Sinclair) Date: Fri Apr 1 06:23:43 2005 Subject: eruby and vim: rhtml In-Reply-To: <20050401102106.GF454@localhost.localdomain> References: <20050227125848.GA16043@code-monkey.de> <87780582508.20050324091046@soyabean.com.au> <20050325093135.GB7674@code-monkey.de> <111919094407.20050325233918@soyabean.com.au> <161210525439.20050401195547@soyabean.com.au> <20050401102106.GF454@localhost.localdomain> Message-ID: <158216034130.20050401212736@soyabean.com.au> On Friday, April 1, 2005, 8:21:06 PM, Doug wrote: >> > 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? >> >> Anyone? That yellow background is annoying, and I'm selfishly asking >> someone to investigate. > It's because the erubyRubyDelim syntax group is linked against the TODO > highlight group. See line 35. > You can change this by adding a line to a ~/.vim/after/syntax/eruby.vim > file such as: > hi link erubyRubyDelim XXX > where XXX is any of the highlight groups specified under > :help group-name I researched this myself, but thanks Doug. I found it difficult to understand the reference docs on :highlight, so just learned by example. Linking it to "Special" looks good to me. Makes the eRuby stand out without making it look really ugly. I don't like the fact that when the filetype is eruby, the filetype becomes HTML. I'll correspond with the plugin author on these matters and ask what he thinks about including it in this project. Cheers, Gavin From dougkearns at gmail.com Fri Apr 1 06:53:17 2005 From: dougkearns at gmail.com (Doug Kearns) Date: Fri Apr 1 06:52:22 2005 Subject: eruby and vim: rhtml In-Reply-To: <158216034130.20050401212736@soyabean.com.au> References: <20050227125848.GA16043@code-monkey.de> <87780582508.20050324091046@soyabean.com.au> <20050325093135.GB7674@code-monkey.de> <111919094407.20050325233918@soyabean.com.au> <161210525439.20050401195547@soyabean.com.au> <20050401102106.GF454@localhost.localdomain> <158216034130.20050401212736@soyabean.com.au> Message-ID: <20050401115316.GH454@localhost.localdomain> On Fri, Apr 01, 2005 at 09:27:36PM +1000, Gavin Sinclair wrote: > I don't like the fact that when the filetype is eruby, the filetype > becomes HTML. Yes, and a little unusual; given a quick survey of the other similar syntax files such as PHP, JSP, CF, ASP. > I'll correspond with the plugin author on these matters and ask what > he thinks about including it in this project. OK, thanks. Regards, Doug From tilman at code-monkey.de Sat Apr 2 06:51:58 2005 From: tilman at code-monkey.de (Tilman Sauerbeck) Date: Sat Apr 2 06:46:46 2005 Subject: syntax/hilight bug re PreProc? Message-ID: <20050402115158.GA1863@code-monkey.de> Hi, it seems there's a bug in ruby.vim regarding the PreProc hilight "class" - it looks like "require", "def", "end" and probably more keywords get put into the PreProc class. I don't understand how this can happen, since PreProc only contains rubySharpBang (ruby.vim). Any idea what's wrong here? -- Regards, Tilman From dougkearns at gmail.com Sat Apr 2 07:13:59 2005 From: dougkearns at gmail.com (Doug Kearns) Date: Sat Apr 2 07:14:17 2005 Subject: syntax/hilight bug re PreProc? In-Reply-To: <20050402115158.GA1863@code-monkey.de> References: <20050402115158.GA1863@code-monkey.de> Message-ID: <20050402121359.GI30642@localhost.localdomain> On Sat, Apr 02, 2005 at 01:51:58PM +0200, Tilman Sauerbeck wrote: > Hi, > it seems there's a bug in ruby.vim regarding the PreProc hilight > "class" - it looks like "require", "def", "end" and probably more > keywords get put into the PreProc class. > > I don't understand how this can happen, since PreProc only contains > rubySharpBang (ruby.vim). It's because they're linked against the minor highlight groups Include and Define which are linked, by default, to PreProc. > Any idea what's wrong here? If you haven't specified different colors for these minor groups via :highlight commands or a 'colorscheme' then PreProc will be used... Regards, Doug From tilman at code-monkey.de Sat Apr 2 13:06:54 2005 From: tilman at code-monkey.de (Tilman Sauerbeck) Date: Sat Apr 2 13:01:42 2005 Subject: syntax/hilight bug re PreProc? In-Reply-To: <20050402121359.GI30642@localhost.localdomain> References: <20050402115158.GA1863@code-monkey.de> <20050402121359.GI30642@localhost.localdomain> Message-ID: <20050402180654.GA5864@code-monkey.de> Doug Kearns [2005-04-02 22:13]: > On Sat, Apr 02, 2005 at 01:51:58PM +0200, Tilman Sauerbeck wrote: > > Hi, > > it seems there's a bug in ruby.vim regarding the PreProc hilight > > "class" - it looks like "require", "def", "end" and probably more > > keywords get put into the PreProc class. > > > > I don't understand how this can happen, since PreProc only contains > > rubySharpBang (ruby.vim). > > It's because they're linked against the minor highlight groups Include > and Define which are linked, by default, to PreProc. > > > Any idea what's wrong here? > > If you haven't specified different colors for these minor groups via > :highlight commands or a 'colorscheme' then PreProc will be used... I see, thank you! -- Regards, Tilman From dougkearns at gmail.com Sun Apr 3 04:18:08 2005 From: dougkearns at gmail.com (Doug Kearns) Date: Sun Apr 3 04:15:51 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: <20050403081808.GL30642@localhost.localdomain> On Tue, Feb 08, 2005 at 08:31:48PM +0100, Tilman Sauerbeck 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. Applied. Thanks! Regards, Doug From dougkearns at gmail.com Mon Apr 4 09:15:04 2005 From: dougkearns at gmail.com (Doug Kearns) Date: Mon Apr 4 09:12:45 2005 Subject: [PATCH] Improved iterator matching, show whitespace errors In-Reply-To: <20050330143231.GA454@localhost.localdomain> References: <20050208193148.GA3293@code-monkey.de> <20050330143231.GA454@localhost.localdomain> Message-ID: <20050404131504.GG27593@localhost.localdomain> On Thu, Mar 31, 2005 at 12:32:31AM +1000, Doug Kearns wrote: > 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 Committed. It's still pretty loose... Regards, Doug From tilman at code-monkey.de Sun Apr 10 07:34:30 2005 From: tilman at code-monkey.de (Tilman Sauerbeck) Date: Sun Apr 10 07:29:03 2005 Subject: [BUG] Broken indentation Message-ID: <20050410113430.GA12225@code-monkey.de> Hi, here's a snippet of code that isn't indented correctly by Vim: foo do bar rescue nil end The final "end" should be placed in column 0, but it's not. -- Regards, Tilman From mailing-lists.vim-ruby-development at rawuncut.elitemail.org Sun Apr 10 08:23:19 2005 From: mailing-lists.vim-ruby-development at rawuncut.elitemail.org (Nikolai Weibull) Date: Sun Apr 10 08:17:57 2005 Subject: [BUG] Broken indentation In-Reply-To: <20050410113430.GA12225@code-monkey.de> References: <20050410113430.GA12225@code-monkey.de> Message-ID: <20050410122319.GB6042@puritan.pcp.ath.cx> Tilman Sauerbeck, April 10: > here's a snippet of code that isn't indented correctly by Vim: > > foo do > bar rescue nil > end > > The final "end" should be placed in column 0, but it's not. In no way am I going to attempt to fix this. You go right ahead and write your code appropriately instead: foo do bar rescue nil end Thanks, nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);} From gsinclair at soyabean.com.au Sun Apr 10 08:44:27 2005 From: gsinclair at soyabean.com.au (Gavin Sinclair) Date: Sun Apr 10 08:40:36 2005 Subject: [BUG] Broken indentation In-Reply-To: <20050410122319.GB6042@puritan.pcp.ath.cx> References: <20050410113430.GA12225@code-monkey.de> <20050410122319.GB6042@puritan.pcp.ath.cx> Message-ID: <158998076798.20050410224427@soyabean.com.au> On Sunday, April 10, 2005, 10:23:19 PM, Nikolai wrote: > Tilman Sauerbeck, April 10: >> here's a snippet of code that isn't indented correctly by Vim: >> >> foo do >> bar rescue nil >> end >> >> The final "end" should be placed in column 0, but it's not. > In no way am I going to attempt to fix this. You go right ahead and > write your code appropriately instead: > foo do > bar > rescue > nil > end Is that valid Ruby? (I wish it was.) You need an explicit 'begin ... end'. Tilman's point stands. Gavin From mailing-lists.vim-ruby-development at rawuncut.elitemail.org Sun Apr 10 09:04:54 2005 From: mailing-lists.vim-ruby-development at rawuncut.elitemail.org (Nikolai Weibull) Date: Sun Apr 10 08:59:25 2005 Subject: [BUG] Broken indentation In-Reply-To: <158998076798.20050410224427@soyabean.com.au> References: <20050410113430.GA12225@code-monkey.de> <20050410122319.GB6042@puritan.pcp.ath.cx> <158998076798.20050410224427@soyabean.com.au> Message-ID: <20050410130454.GC6042@puritan.pcp.ath.cx> Gavin Sinclair, April 10: > > foo do > > bar > > rescue > > nil > > end > Is that valid Ruby? (I wish it was.) You need an explicit 'begin ... > end'. Tilman's point stands. Actually, it's valid; it works anyways, nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);} From dougkearns at gmail.com Sun Apr 10 09:27:23 2005 From: dougkearns at gmail.com (Doug Kearns) Date: Sun Apr 10 09:26:15 2005 Subject: [BUG] Broken indentation In-Reply-To: <20050410122319.GB6042@puritan.pcp.ath.cx> References: <20050410113430.GA12225@code-monkey.de> <20050410122319.GB6042@puritan.pcp.ath.cx> Message-ID: <20050410132723.GA4301@localhost.localdomain> On Sun, Apr 10, 2005 at 02:23:19PM +0200, Nikolai Weibull wrote: > Tilman Sauerbeck, April 10: > > > here's a snippet of code that isn't indented correctly by Vim: > > > > foo do > > bar rescue nil > > end > > > > The final "end" should be placed in column 0, but it's not. > > In no way am I going to attempt to fix this. You go right ahead and > write your code appropriately instead: Heh, can I adopt this approach too? ;-) Regards, Doug From dougkearns at gmail.com Sun Apr 10 09:31:35 2005 From: dougkearns at gmail.com (Doug Kearns) Date: Sun Apr 10 09:30:26 2005 Subject: [BUG] Broken indentation In-Reply-To: <20050410130454.GC6042@puritan.pcp.ath.cx> References: <20050410113430.GA12225@code-monkey.de> <20050410122319.GB6042@puritan.pcp.ath.cx> <158998076798.20050410224427@soyabean.com.au> <20050410130454.GC6042@puritan.pcp.ath.cx> Message-ID: <20050410133135.GB4301@localhost.localdomain> On Sun, Apr 10, 2005 at 03:04:54PM +0200, Nikolai Weibull wrote: > Gavin Sinclair, April 10: > > > > foo do > > > bar > > > rescue > > > nil > > > end > > > Is that valid Ruby? (I wish it was.) You need an explicit 'begin ... > > end'. Tilman's point stands. > > Actually, it's valid; It is? > it works anyways, It does? Regards, Doug From sroberts at uniserve.com Sun Apr 10 09:47:48 2005 From: sroberts at uniserve.com (Sam Roberts) Date: Sun Apr 10 09:42:49 2005 Subject: [BUG] Broken indentation In-Reply-To: <20050410133135.GB4301@localhost.localdomain> References: <20050410113430.GA12225@code-monkey.de> <20050410122319.GB6042@puritan.pcp.ath.cx> <158998076798.20050410224427@soyabean.com.au> <20050410130454.GC6042@puritan.pcp.ath.cx> <20050410133135.GB4301@localhost.localdomain> Message-ID: <20050410134748.GC472@ensemble.local> Quoting dougkearns@gmail.com, on Sun, Apr 10, 2005 at 11:31:35PM +1000: > On Sun, Apr 10, 2005 at 03:04:54PM +0200, Nikolai Weibull wrote: > > Gavin Sinclair, April 10: > > > > > > foo do > > > > bar > > > > rescue > > > > nil > > > > end > > > > > Is that valid Ruby? (I wish it was.) You need an explicit 'begin ... > > > end'. Tilman's point stands. > > > > Actually, it's valid; > > It is? Pretty sure, I found out recently. Handy for doing: foo = method_that_may_raise('an arg') rescue nil foo should be set to nil if something derived from StandardError is raised, if I recall correctly. Sam From mailing-lists.vim-ruby-development at rawuncut.elitemail.org Sun Apr 10 10:06:46 2005 From: mailing-lists.vim-ruby-development at rawuncut.elitemail.org (Nikolai Weibull) Date: Sun Apr 10 10:01:16 2005 Subject: [BUG] Broken indentation In-Reply-To: <20050410132723.GA4301@localhost.localdomain> References: <20050410113430.GA12225@code-monkey.de> <20050410122319.GB6042@puritan.pcp.ath.cx> <20050410132723.GA4301@localhost.localdomain> Message-ID: <20050410140646.GD6042@puritan.pcp.ath.cx> Doug Kearns, April 10: > On Sun, Apr 10, 2005 at 02:23:19PM +0200, Nikolai Weibull wrote: > > In no way am I going to attempt to fix this. You go right ahead and > > write your code appropriately instead: > Heh, can I adopt this approach too? ;-) One has to be able to say ?no?. I'll add support for this construct when I have time--think August or September..., nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);} From gsinclair at soyabean.com.au Sun Apr 10 10:13:39 2005 From: gsinclair at soyabean.com.au (Gavin Sinclair) Date: Sun Apr 10 10:09:25 2005 Subject: [BUG] Broken indentation In-Reply-To: <20050410134748.GC472@ensemble.local> References: <20050410113430.GA12225@code-monkey.de> <20050410122319.GB6042@puritan.pcp.ath.cx> <158998076798.20050410224427@soyabean.com.au> <20050410130454.GC6042@puritan.pcp.ath.cx> <20050410133135.GB4301@localhost.localdomain> <20050410134748.GC472@ensemble.local> Message-ID: <371003428794.20050411001339@soyabean.com.au> On Sunday, April 10, 2005, 11:47:48 PM, Sam wrote: > Quoting dougkearns@gmail.com, on Sun, Apr 10, 2005 at 11:31:35PM +1000: >> On Sun, Apr 10, 2005 at 03:04:54PM +0200, Nikolai Weibull wrote: >> > Gavin Sinclair, April 10: >> > >> > > > foo do >> > > > bar >> > > > rescue >> > > > nil >> > > > end >> > >> > > Is that valid Ruby? (I wish it was.) You need an explicit 'begin ... >> > > end'. Tilman's point stands. >> > >> > Actually, it's valid; >> >> It is? > Pretty sure, I found out recently. Handy for doing: > foo = method_that_may_raise('an arg') rescue nil > foo should be set to nil if something derived from StandardError is > raised, if I recall correctly. Yes, and that's the syntax Tilman was pointing out. That is valid Ruby. Nikolai misunderstood, suggesting it be rewritten as what you see above. The two code fragments are, however, not equivalent. Tilman's code is valid and does not indent correctly. Nikolai's code is invalid, but indents correctly :) Gavin P.S. I repeat: the following two fragments are _not_ equivalent! 10.times do puts(x) rescue nil end 10.times do puts(x) rescue nil end If the second fragment were legal, they'd be equivalent (I guess) but only for the special case where there's only one line in the block! From mailing-lists.vim-ruby-development at rawuncut.elitemail.org Sun Apr 10 10:33:05 2005 From: mailing-lists.vim-ruby-development at rawuncut.elitemail.org (Nikolai Weibull) Date: Sun Apr 10 10:27:34 2005 Subject: [BUG] Broken indentation In-Reply-To: <371003428794.20050411001339@soyabean.com.au> References: <20050410113430.GA12225@code-monkey.de> <20050410122319.GB6042@puritan.pcp.ath.cx> <158998076798.20050410224427@soyabean.com.au> <20050410130454.GC6042@puritan.pcp.ath.cx> <20050410133135.GB4301@localhost.localdomain> <20050410134748.GC472@ensemble.local> <371003428794.20050411001339@soyabean.com.au> Message-ID: <20050410143304.GE6042@puritan.pcp.ath.cx> Gavin Sinclair, April 11: > P.S. I repeat: the following two fragments are _not_ equivalent! > > 10.times do > puts(x) rescue nil > end > > 10.times do > puts(x) > rescue > nil > end > > If the second fragment were legal, they'd be equivalent (I guess) but > only for the special case where there's only one line in the block! OK. Still, I'm not fixing this. If anyone has an interest and would like to try, then please, go right ahead. I'm booked for the next 6 months or so, nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);} From gsinclair at soyabean.com.au Fri Apr 15 05:19:42 2005 From: gsinclair at soyabean.com.au (Gavin Sinclair) Date: Fri Apr 15 05:14:45 2005 Subject: Problem with highlighting and indenting Message-ID: <111417696830.20050415191942@soyabean.com.au> Try this for size: "blah blah (#{blah}" havent_we_finished the string yet? The unmatched open parenthesis is throwing highlighting and indenting out. Gavin From dougkearns at gmail.com Fri Apr 15 05:41:01 2005 From: dougkearns at gmail.com (Doug Kearns) Date: Fri Apr 15 05:32:42 2005 Subject: Problem with highlighting and indenting In-Reply-To: <111417696830.20050415191942@soyabean.com.au> References: <111417696830.20050415191942@soyabean.com.au> Message-ID: <20050415094101.GF4224@localhost.localdomain> On Fri, Apr 15, 2005 at 07:19:42PM +1000, Gavin Sinclair wrote: > Try this for size: > > "blah blah (#{blah}" > havent_we_finished the string yet? > > The unmatched open parenthesis is throwing highlighting and indenting > out. Are you saying that "havent_we_finished the string yet?" is still being highlighted as part of the string for you? 1.45 works fine for me... Regards, Doug From gsinclair at soyabean.com.au Fri Apr 15 05:40:22 2005 From: gsinclair at soyabean.com.au (Gavin Sinclair) Date: Fri Apr 15 05:35:35 2005 Subject: Problem with highlighting and indenting In-Reply-To: <20050415094101.GF4224@localhost.localdomain> References: <111417696830.20050415191942@soyabean.com.au> <20050415094101.GF4224@localhost.localdomain> Message-ID: <1291418936713.20050415194022@soyabean.com.au> On Friday, April 15, 2005, 7:41:01 PM, Doug wrote: > On Fri, Apr 15, 2005 at 07:19:42PM +1000, Gavin Sinclair wrote: >> Try this for size: >> >> "blah blah (#{blah}" >> havent_we_finished the string yet? >> >> The unmatched open parenthesis is throwing highlighting and indenting >> out. > Are you saying that "havent_we_finished the string yet?" is still being > highlighted as part of the string for you? 1.45 works fine for me... Correct. I guess something's askew with my system. Watch this space... Gavin From ken.miller at gmail.com Fri Apr 15 12:07:57 2005 From: ken.miller at gmail.com (Ken Miller) Date: Fri Apr 15 12:02:22 2005 Subject: Problem with highlighting and indenting In-Reply-To: <1291418936713.20050415194022@soyabean.com.au> References: <111417696830.20050415191942@soyabean.com.au> <20050415094101.GF4224@localhost.localdomain> <1291418936713.20050415194022@soyabean.com.au> Message-ID: That sort of error -should- have been fixed by my last patch, but it's possible I missed something. Let me know what you find. K On 4/15/05, Gavin Sinclair wrote: > On Friday, April 15, 2005, 7:41:01 PM, Doug wrote: > > > On Fri, Apr 15, 2005 at 07:19:42PM +1000, Gavin Sinclair wrote: > >> Try this for size: > >> > >> "blah blah (#{blah}" > >> havent_we_finished the string yet? > >> > >> The unmatched open parenthesis is throwing highlighting and indenting > >> out. > > > Are you saying that "havent_we_finished the string yet?" is still being > > highlighted as part of the string for you? 1.45 works fine for me... > > Correct. I guess something's askew with my system. Watch this > space... > > Gavin > > > _______________________________________________ > vim-ruby-devel mailing list > vim-ruby-devel@rubyforge.org > http://rubyforge.org/mailman/listinfo/vim-ruby-devel > From hgs at dmu.ac.uk Mon Apr 25 14:28:36 2005 From: hgs at dmu.ac.uk (Hugh Sasse) Date: Mon Apr 25 14:35:19 2005 Subject: Stable release? Message-ID: Is the CVS considered stable now? I ask because I have just updated vim on one machine by some 40 patches, and considering the next step notice that http://rubyforge.org/frs/?group_id=16 displays files some 7 months old (2004-09-20). Hugh From gsinclair at soyabean.com.au Mon Apr 25 23:04:15 2005 From: gsinclair at soyabean.com.au (Gavin Sinclair) Date: Mon Apr 25 22:58:50 2005 Subject: Stable release? In-Reply-To: References: Message-ID: <80843953551.20050426130415@soyabean.com.au> On Tuesday, April 26, 2005, 4:28:36 AM, Hugh wrote: > Is the CVS considered stable now? I ask because I have just updated > vim on one machine by some 40 patches, and considering the next step > notice that > http://rubyforge.org/frs/?group_id=16 > displays files some 7 months old (2004-09-20). You mean 40 patches to vim itself? What's the "next step" you're talking about? Anyway, AFAIK the CVS is stable, but can't guarantee it :) I'd advise you to use it. I guess it's time for another release. Gavin From asp16 at alu.ua.es Thu Apr 28 21:03:17 2005 From: asp16 at alu.ua.es (Adeodato =?iso-8859-1?Q?Sim=F3?=) Date: Thu Apr 28 20:57:18 2005 Subject: makes fold get created an closed in insert mode Message-ID: <20050429010317.GB20386@chistera.yi.org> Hi! I'm new on the list, though I've been using the various ruby.vim files for a time now. :) I just discovered today that syntax/ruby.vim has support for folding, and I'm giving it a try (I had a hand-made function for this before). Anyway, I'm experiencing a weird problem, can anybody reproduce?: With foldmethod=syntax, vim something.rb, enter insert mode, and write begin. For me, that immediately creates a two-line fold and closes it. The odd thing is that it only happens if the "begin" is written in the last line of the file (i.e., there are no more lines after it). If e.g. there is a blank line there, it doesn't happen. It can be worked around by always having a blank line at the end, but it'd be nice to have this fixed. Thanks! -- Adeodato Sim? EM: asp16 [ykwim] alu.ua.es | PK: DA6AE621 We may not return the affection of those who like us, but we always respect their good judgement. From dougkearns at gmail.com Fri Apr 29 08:29:41 2005 From: dougkearns at gmail.com (Doug Kearns) Date: Fri Apr 29 08:20:58 2005 Subject: [andrew@walrond.org: Re: Folding editor for ruby code browsing] Message-ID: <20050429122941.GA18994@localhost.localdomain> I'm not sure whose responsible for the installer (Hugh?) but I'll leave this one to you... :-) Regards, Doug PS. Gavin, I thought we'd fixed the line endings malarkey long ago? ----- Forwarded message from Andrew Walrond ----- From: Andrew Walrond User-Agent: KMail/1.7.2 Date: Thu, 28 Apr 2005 17:39:59 +0100 Subject: Re: Folding editor for ruby code browsing To: Doug Kearns Hi Doug, On Thursday 28 April 2005 11:28, you wrote: > > I think you'll find that you're using a rather old version of ruby.vim. > You can get the latest from the project page above. > Did you know the installer won't run under linux unless it is first converted to unix format? Weird... $ tar -xzf vim-ruby-2004.09.20.tgz $ cd vim-ruby-2004.09.20 vim-ruby-2004.09.20 $ bin/vim-ruby-install.rb : No such file or directory vim-ruby-2004.09.20 $ dos2unix bin/vim-ruby-install.rb vim-ruby-2004.09.20 $ bin/vim-ruby-install.rb Couldn't find any Vim installation directories. Please enter the full path to your Vim installation directory: ----- End forwarded message ----- From dougkearns at gmail.com Fri Apr 29 08:45:56 2005 From: dougkearns at gmail.com (Doug Kearns) Date: Fri Apr 29 08:37:14 2005 Subject: Stable release? In-Reply-To: References: Message-ID: <20050429124556.GB19087@localhost.localdomain> On Mon, Apr 25, 2005 at 07:28:36PM +0100, Hugh Sasse wrote: > Is the CVS considered stable now? Yes. I think so. Do you not use the latest CVS? > I ask because I have just updated > vim on one machine by some 40 patches, and considering the next step > notice that > http://rubyforge.org/frs/?group_id=16 > displays files some 7 months old (2004-09-20). Yes, we really should release more often. Just as long as Gavin is responsible for organising it. ;-) Regards, Doug From hgs at dmu.ac.uk Fri Apr 29 09:16:54 2005 From: hgs at dmu.ac.uk (Hugh Sasse) Date: Fri Apr 29 09:11:03 2005 Subject: Stable release? In-Reply-To: <20050429124556.GB19087@localhost.localdomain> References: <20050429124556.GB19087@localhost.localdomain> Message-ID: On Fri, 29 Apr 2005, Doug Kearns wrote: > On Mon, Apr 25, 2005 at 07:28:36PM +0100, Hugh Sasse wrote: >> Is the CVS considered stable now? > > Yes. I think so. Do you not use the latest CVS? No. I'm in the thick of many things at the moment and can't really hack about with this now. > >> I ask because I have just updated >> vim on one machine by some 40 patches, and considering the next step >> notice that >> http://rubyforge.org/frs/?group_id=16 >> displays files some 7 months old (2004-09-20). > > Yes, we really should release more often. Just as long as Gavin is > responsible for organising it. ;-) > > Regards, > Doug Hugh From hgs at dmu.ac.uk Fri Apr 29 09:14:56 2005 From: hgs at dmu.ac.uk (Hugh Sasse) Date: Fri Apr 29 09:12:24 2005 Subject: [andrew@walrond.org: Re: Folding editor for ruby code browsing] In-Reply-To: <20050429122941.GA18994@localhost.localdomain> References: <20050429122941.GA18994@localhost.localdomain> Message-ID: On Fri, 29 Apr 2005, Doug Kearns wrote: > I'm not sure whose responsible for the installer (Hugh?) but I'll leave > this one to you... :-) Not really me: I just added folding in the places where it looked likely from other vim files and it seemed to work OK. I freely admit it was a amateurish bodge, but it seemed effective at the time. I think more vim-script fluency is needed here, than I seem to have. I did raise problems with the installer a while back, but there seemed to be no resolution. I think there have been patches since 20-SEP-2004 for that matter, so we could do with a new rollout anyway. Which I'd be willing to try out. > > Regards, > Doug > > PS. Gavin, I thought we'd fixed the line endings malarkey long ago? > From gsinclair at soyabean.com.au Sat Apr 30 21:52:07 2005 From: gsinclair at soyabean.com.au (Gavin Sinclair) Date: Sat Apr 30 21:46:07 2005 Subject: [andrew@walrond.org: Re: Folding editor for ruby code browsing] In-Reply-To: <20050429122941.GA18994@localhost.localdomain> References: <20050429122941.GA18994@localhost.localdomain> Message-ID: <268844087.20050501115207@soyabean.com.au> On Friday, April 29, 2005, 10:29:41 PM, Doug wrote: > PS. Gavin, I thought we'd fixed the line endings malarkey long ago? Sigh.... so did I. From dougkearns at gmail.com Mon May 2 05:46:01 2005 From: dougkearns at gmail.com (Doug Kearns) Date: Mon May 2 05:40:06 2005 Subject: [andrew@walrond.org: Re: Folding editor for ruby code browsing] Message-ID: <20050502094601.GB25596@localhost.localdomain> ----- Forwarded message from Andrew Walrond ----- From: Andrew Walrond User-Agent: KMail/1.7.2 Date: Mon, 2 May 2005 10:30:18 +0100 Subject: Re: Folding editor for ruby code browsing To: Doug Kearns On Thursday 28 April 2005 11:28, you wrote: x> > > > On Wednesday 27 April 2005 10:52, Doug Kearns wrote: > > > You can send them to me, the vim-ruby-devel@rubyforge.org list, or > > > enter them in the bug tracker at http://rubyforge.org/projects/vim-ruby > > > - I'm not too fussed. > > > Attached is another weird indentation case from vim Andrew Walrond ----- End forwarded message ----- -------------- next part -------------- def build() dir = unpack() dir.cd { globaledit('/lib64','/lib') } if $host.generic=='x86_64' $host.generic.mkdir.cd bash("../#{dir}/configure #{stdconfig} "+ "--disable-profile "+ "--enable-add-ons=#{attribute('threads')} "+ "--with-tls "+ (attribute('threads')=='linuxthreads' ? '--without-__thread ' : '')+ "--enable-kernel=#{attribute('oldest-kernel')} "+ "--with-headers=#{path($root,$kernel_headers.incdir)} "+ "--without-selinux "+ "--without-cvs "+ "--build=#{$host.full} "+ "--host=#{$host.full} " ) bash("make -j#{$mj}") end From dougkearns at gmail.com Tue May 3 00:04:05 2005 From: dougkearns at gmail.com (Doug Kearns) Date: Tue May 3 01:58:12 2005 Subject: [andrew@walrond.org: Another ruby-vim indent problem] Message-ID: <20050503040405.GA6079@localhost.localdomain> ----- Forwarded message from Andrew Walrond ----- From: Andrew Walrond User-Agent: KMail/1.7.2 Date: Mon, 2 May 2005 22:06:15 +0100 Subject: Another ruby-vim indent problem To: Doug Kearns Hi Doug The attached file ends up way over to the right... Andrew ----- End forwarded message ----- -------------- next part -------------- # Populate the root filesystem with the basic directories and files. # Only used during bootstrap. # def populate_fs() puts('Populating root filesystem') $root.cd { umask(0) { %w{ dev etc home include lib mnt pkg proc share sys }.each { |d| d.mkdir(0755) } 'etc/fstab'.ftouch('# ', '#/dev/hda1 / ext3 noatime 0 1', '#/dev/hda2 /mnt/root2 ext3 noauto,noatime 1 2', '#/dev/hda3 none swap sw 0 0', '#/dev/hda4 /home ext3 noatime 1 2', '#/dev/hdc1 /mnt/cdrom iso9660 noauto,ro 0 0' ).chmod(0644) 'etc/hosts'.ftouch('# Hostname-to-address mappings for the TCP/IP subsystem', '# IP address FQDN Alias(es)', '127.0.0.1 localhost', '127.0.0.1 heretic.local-domain' ).chmod(0644) 'etc/host.conf'.ftouch('# Resolver configuration file', 'order hosts,bind', 'multi on' ).chmod(0644) 'etc/mtab'.ftouch('').chmod(0644) 'etc/networks'.ftouch('# Netname-to-address mappings for the TCP/IP subsystem', '# Netname IP address', 'loopback 127.0.0.1' ).chmod(0644) 'etc/nsswitch.conf'.ftouch('passwd: db files', 'group: db files', 'shadow: db files', 'hosts: files dns', 'networks: files dns', 'protocols: db files', 'services: db files', 'ethers: db files', 'rpc: db files', 'netgroup: db files' ).chmod(0644) 'etc/protocols'.ftouch('# Protocols available from the TCP/IP subsystem.', 'ip 0 IP # internet protocol, pseudo protocol number', 'icmp 1 ICMP # internet control message protocol', 'igmp 2 IGMP # internet group multicast protocol', 'ggp 3 GGP # gateway-gateway protocol', 'tcp 6 TCP # transmission control protocol', 'pup 12 PUP # PARC universal packet protocol', 'udp 17 UDP # user datagram protocol', 'idp 22 IDP # WhatsThis?', 'raw 255 RAW # RAW IP interface' ).chmod(0644) 'etc/resolv.conf'.ftouch().chmod(0644) unless 'etc/services'.exists? path(HERETIXDIR,'port-numbers').cp('etc/services') 'etc/services'.fedit { |line| line.gsub!("\C-M","") if line =~ /(^\S+)\s+(\d+)\/(\S+)\s+(\S+|$)/ sname,sport,sencap,sdesc = $1,$2,$3,$4 line.replace "#{$1.ljust(20)} #{$2.rjust(5)}/#{$3.ljust(6)}##{$4}\n" else line.replace("#"+line) unless line[0]==?# end } end 'home/public'.mkdir(01777) 'home/root'.mkdir(0700) 'pkg/.snapshot'.mkdir(0755) 'tmp'.mkdir.chmod(01777) 'usr'.symlink('.') } } end # Create the basic device files in /dev. Heretix uses hotplug/udev when booting normally, # but these devices are needed during early boot, bootstrap and chroot operation. # def make_devices() puts('Populating /dev') $root.cd { umask(0) { 'dev'.cd { %w{ shm pts input rd usb isdn cpu cpu/0 cpu/1 i2o net watchdogs dri }.each { |d| d.mkdir(0755) } # Load the devices file devices = path(HERETIXDIR,'devices').fread() devices.each { |line| next unless line =~ /(\S+)\s+(\S+)\s+(\S+)\s+(\d+)\s+(\S)\s+(\d+)\s+(\d+)/ raise 'makedev' unless $1.exists? or system("mknod --mode #{$4} #{$1} #{$5} #{$6} #{$7}") $1.chown(User[$2].uid,Group[$3].gid) } { '/proc/self/fd'=>'fd','fd/0'=>'stdin','fd/1'=>'stdout','fd/2'=>'stderr', '/proc/kcore'=>'core','ram0'=>'ramdisk' }.each { |s,d| d.symlink(s) } } } } end From gsinclair at soyabean.com.au Tue May 3 04:11:19 2005 From: gsinclair at soyabean.com.au (Gavin Sinclair) Date: Tue May 3 04:05:26 2005 Subject: [andrew@walrond.org: Re: Folding editor for ruby code browsing] In-Reply-To: <20050502094601.GB25596@localhost.localdomain> References: <20050502094601.GB25596@localhost.localdomain> Message-ID: <17126736024.20050503181119@soyabean.com.au> Here it is inline, after gg=G in my vim: def build() dir = unpack() dir.cd { globaledit('/lib64','/lib') } if $host.generic=='x86_64' $host.generic.mkdir.cd bash("../#{dir}/configure #{stdconfig} "+ "--disable-profile "+ "--enable-add-ons=#{attribute('threads')} "+ "--with-tls "+ (attribute('threads')=='linuxthreads' ? '--without-__thread ' : '')+ "--enable-kernel=#{attribute('oldest-kernel')} "+ "--with-headers=#{path($root,$kernel_headers.incdir)} "+ "--without-selinux "+ "--without-cvs "+ "--build=#{$host.full} "+ "--host=#{$host.full} " ) bash("make -j#{$mj}") end Just reproducing it to acknowledge that I've seen the problem. Got no idea how to fix it :) My advice to Andrew (cc'ed) is to write the code another way (e.g. here-doc). Reason being: I don't think any significant improvement is going to be made to Vim's ruby indentation until such time as someone writes an Ruby code indenter in Ruby. Then the indenting logic can be more easily tested and improved, and reimplemented in other languages (Vim, elisp, textmate, ...). If I could do anything to improve the Vim-based code as it stands, I would. Nikolai did a great job in record time to get it where it is, but the peculiarities of Ruby require a real programming language :) Cheers, Gavin From gsinclair at soyabean.com.au Tue May 3 04:11:19 2005 From: gsinclair at soyabean.com.au (Gavin Sinclair) Date: Tue May 3 04:05:27 2005 Subject: [andrew@walrond.org: Re: Folding editor for ruby code browsing] In-Reply-To: <20050502094601.GB25596@localhost.localdomain> References: <20050502094601.GB25596@localhost.localdomain> Message-ID: <17126736024.20050503181119@soyabean.com.au> Here it is inline, after gg=G in my vim: def build() dir = unpack() dir.cd { globaledit('/lib64','/lib') } if $host.generic=='x86_64' $host.generic.mkdir.cd bash("../#{dir}/configure #{stdconfig} "+ "--disable-profile "+ "--enable-add-ons=#{attribute('threads')} "+ "--with-tls "+ (attribute('threads')=='linuxthreads' ? '--without-__thread ' : '')+ "--enable-kernel=#{attribute('oldest-kernel')} "+ "--with-headers=#{path($root,$kernel_headers.incdir)} "+ "--without-selinux "+ "--without-cvs "+ "--build=#{$host.full} "+ "--host=#{$host.full} " ) bash("make -j#{$mj}") end Just reproducing it to acknowledge that I've seen the problem. Got no idea how to fix it :) My advice to Andrew (cc'ed) is to write the code another way (e.g. here-doc). Reason being: I don't think any significant improvement is going to be made to Vim's ruby indentation until such time as someone writes an Ruby code indenter in Ruby. Then the indenting logic can be more easily tested and improved, and reimplemented in other languages (Vim, elisp, textmate, ...). If I could do anything to improve the Vim-based code as it stands, I would. Nikolai did a great job in record time to get it where it is, but the peculiarities of Ruby require a real programming language :) Cheers, Gavin From gsinclair at soyabean.com.au Tue May 3 04:31:18 2005 From: gsinclair at soyabean.com.au (Gavin Sinclair) Date: Tue May 3 04:25:22 2005 Subject: [andrew@walrond.org: Another ruby-vim indent problem] In-Reply-To: <20050503040405.GA6079@localhost.localdomain> References: <20050503040405.GA6079@localhost.localdomain> Message-ID: <12627934537.20050503183118@soyabean.com.au> On Tuesday, May 3, 2005, 2:04:05 PM, Doug wrote: > The attached file ends up way over to the right... > [forwarded from] Andrew Reproduced inline with my indentation settings below. There are a couple of problems with this one. - line 8: very odd that it's not indented correctly - line 16 etc.: perhaps this comes from vim not looking far enough back to work out where to start the line (no, don't think so - deleting intermediate lines doesn't help) - line 25 etc.: lots of blank lines (not an indenting issue) - line 125-6: same indenting issue as line 8 - bizzare As per the other issue, not much I can offer except consolation and advice: write smaller methods to isolate the code fragments from each other. I'll try to understand what's causing these problems and fix it, but there's not much chance I'll get anywhere. Gavin ----------------------------------------------------------------------- 1 # Populate the root filesystem with the basic directories and files. 2 # Only used during bootstrap. 3 # 4 def populate_fs() 5 puts('Populating root filesystem') 6 $root.cd { 7 umask(0) { 8 %w{ dev etc home include lib mnt pkg proc share sys }.each { |d| d.mkdir(0755) } 9 'etc/fstab'.ftouch('# ', 10 '#/dev/hda1 / ext3 noatime 0 1', 11 '#/dev/hda2 /mnt/root2 ext3 noauto,noatime 1 2', 12 '#/dev/hda3 none swap sw 0 0', 13 '#/dev/hda4 /home ext3 noatime 1 2', 14 '#/dev/hdc1 /mnt/cdrom iso9660 noauto,ro 0 0' 15 ).chmod(0644) 16 'etc/hosts'.ftouch('# Hostname-to-address mappings for the TCP/IP subsystem', 17 '# IP address FQDN Alias(es)', 18 '127.0.0.1 localhost', 19 '127.0.0.1 heretic.local-domain' 20 ).chmod(0644) 21 'etc/host.conf'.ftouch('# Resolver configuration file', 22 'order hosts,bind', 23 'multi on' 24 ).chmod(0644) 25 26 'etc/mtab'.ftouch('').chmod(0644) 27 28 'etc/networks'.ftouch('# Netname-to-address mappings for the TCP/IP subsystem', 29 30 '# Netname IP address', 31 32 'loopback 127.0.0.1' 33 34 ).chmod(0644) 35 36 'etc/nsswitch.conf'.ftouch('passwd: db files', 37 38 'group: db files', 39 40 'shadow: db files', 41 42 'hosts: files dns', 43 44 'networks: files dns', 45 46 'protocols: db files', 47 48 'services: db files', 49 50 'ethers: db files', 51 52 'rpc: db files', 53 54 'netgroup: db files' 55 56 ).chmod(0644) 57 58 'etc/protocols'.ftouch('# Protocols available from the TCP/IP subsystem.', 59 60 'ip 0 IP # internet protocol, pseudo protocol number', 61 62 'icmp 1 ICMP # internet control message protocol', 63 64 'igmp 2 IGMP # internet group multicast protocol', 65 66 'ggp 3 GGP # gateway-gateway protocol', 67 68 'tcp 6 TCP # transmission control protocol', 69 70 'pup 12 PUP # PARC universal packet protocol', 71 72 'udp 17 UDP # user datagram protocol', 73 74 'idp 22 IDP # WhatsThis?', 75 76 'raw 255 RAW # RAW IP interface' 77 78 ).chmod(0644) 79 80 'etc/resolv.conf'.ftouch().chmod(0644) 81 82 unless 'etc/services'.exists? 83 84 path(HERETIXDIR,'port-numbers').cp('etc/services') 85 86 'etc/services'.fedit { |line| 87 88 line.gsub!("\C-M","") 89 90 if line =~ /(^\S+)\s+(\d+)\/(\S+)\s+(\S+|$)/ 91 92 sname,sport,sencap,sdesc = $1,$2,$3,$4 93 94 line.replace "#{$1.ljust(20)} #{$2.rjust(5)}/#{$3.ljust(6)}##{$4}\n" 95 96 else 97 98 line.replace("#"+line) unless line[0]==?# 99 100 end 101 102 103 end 104 105 'home/public'.mkdir(01777) 106 107 'home/root'.mkdir(0700) 108 109 'pkg/.snapshot'.mkdir(0755) 110 111 'tmp'.mkdir.chmod(01777) 112 113 'usr'.symlink('.') 114 } 115 } 116 end 117 118 119 # Create the basic device files in /dev. Heretix uses hotplug/udev when booting normally, 120 # but these devices are needed during early boot, bootstrap and chroot operation. 121 # 122 def make_devices() 123 puts('Populating /dev') 124 $root.cd { 125 umask(0) { 126 'dev'.cd { 127 %w{ shm pts input rd usb isdn cpu cpu/0 cpu/1 i2o net watchdogs dri }.each { |d| d.mkdir(0755) } 128 129 # Load the devices file 130 devices = path(HERETIXDIR,'devices').fread() 131 132 devices.each { |line| 133 next unless line =~ /(\S+)\s+(\S+)\s+(\S+)\s+(\d+)\s+(\S)\s+(\d+)\s+(\d+)/ 134 raise 'makedev' unless $1.exists? or system("mknod --mode #{$4} #{$1} #{$5} #{$6} #{$7}") 135 $1.chown(User[$2].uid,Group[$3].gid) 136 } 137 138 { 139 '/proc/self/fd'=>'fd','fd/0'=>'stdin','fd/1'=>'stdout','fd/2'=>'stderr', 140 '/proc/kcore'=>'core','ram0'=>'ramdisk' 141 }.each { |s,d| d.symlink(s) } 142 } 143 } 144 } 145 end 146 From gsinclair at soyabean.com.au Tue May 3 04:32:59 2005 From: gsinclair at soyabean.com.au (Gavin Sinclair) Date: Tue May 3 04:27:01 2005 Subject: [andrew@walrond.org: Re: Folding editor for ruby code browsing] In-Reply-To: <17126736024.20050503181119@soyabean.com.au> References: <20050502094601.GB25596@localhost.localdomain> <17126736024.20050503181119@soyabean.com.au> Message-ID: <4028035643.20050503183259@soyabean.com.au> Aargh!! Double-post! Meant to CC Andrew but apparently didn't! Bugger! On Tuesday, May 3, 2005, 6:11:19 PM, Gavin wrote: > Here it is inline, after gg=G in my vim: [...]