From drbrain at segment7.net Wed Apr 5 16:56:37 2006 From: drbrain at segment7.net (Eric Hodel) Date: Wed, 5 Apr 2006 13:56:37 -0700 Subject: vim-ruby feels too slow Message-ID: <3D19F0BB-A076-48B3-B41F-35337CB8818A@segment7.net> I remember first using vim with ruby highlighting and indenting on a Pentium 133 Laptop with 40MB of memory something like four years ago. I remember it being slow, but it was a Pentium 133 with limited memory. I didn't expect much. Now I have a 1.5GHz G4 powerbook with 2GB of memory. vim feels slower now than it did on that Pentium 133. I know that the indenting and highlighting are vastly improved for vim, but it doesn't seem that it should be this slow. Sometimes opening a ruby file pegs my CPU for five to ten seconds (usually one of the 100k internal Rails files). Here's a semi-scientific concrete example that just shows starting up. I'll ignore editing because that's much more difficult to quantify, but editing can be just as slow in certain sections of files that take a long time to open. To start vim on my machine takes about 1/3 of a second, at best 1/5 of a second: $ time vim -c ':q' real 0m0.216s user 0m0.070s sys 0m0.110s $ time vim -c ':q' real 0m0.318s user 0m0.125s sys 0m0.153s I have a test suite with 391 lines in it for 13k: $ wc test/controllers/entry_controller_test.rb 391 917 13181 test/controllers/entry_controller_test.rb There's really nothing fancy in the file. Just a class with a bunch of methods, a couple of Hashes and strings and so-on. If I move all the ruby-specific vim-ruby files aside I get between .6 and .75 seconds when starting ruby: $ find ~/.vim/ -name "ruby*" /Users/drbrain/.vim//compiler/ruby.vim.bak /Users/drbrain/.vim//compiler/rubyunit.vim /Users/drbrain/.vim//ftdetect/ruby.vim.bak /Users/drbrain/.vim//ftplugin/ruby.vim.bak /Users/drbrain/.vim//indent/ruby.vim.bak /Users/drbrain/.vim//syntax/doc/ruby.txt.bak /Users/drbrain/.vim//syntax/ruby.vim.bak $ time vim -c ':q' test/controllers/entry_controller_test.rb real 0m0.595s user 0m0.291s sys 0m0.224s $ time vim -c ':q' test/controllers/entry_controller_test.rb real 0m0.751s user 0m0.310s sys 0m0.229s If I add the files back: $ find ~/.vim/ -name "ruby*" /Users/drbrain/.vim//compiler/ruby.vim /Users/drbrain/.vim//compiler/rubyunit.vim /Users/drbrain/.vim//ftdetect/ruby.vim /Users/drbrain/.vim//ftplugin/ruby.vim /Users/drbrain/.vim//indent/ruby.vim /Users/drbrain/.vim//syntax/doc/ruby.txt /Users/drbrain/.vim//syntax/ruby.vim I see between 1 second and 1.5 seconds to start the same file: $ time vim -c ':q' test/controllers/entry_controller_test.rb real 0m0.985s user 0m0.623s sys 0m0.259s $ time vim -c ':q' test/controllers/entry_controller_test.rb real 0m1.574s user 0m0.615s sys 0m0.252s For real punishment I can give you r2ctestcase.rb from ruby2c. $ wc r2ctestcase.rb 1351 3522 51231 r2ctestcase.rb $ time vim -c ':q' r2ctestcase.rb real 0m3.985s user 0m2.788s sys 0m0.498s In case I'm actually doing something stupid in my .vimrc, here it is. I don't believe I've changed it substantially since I started using vim. -------------- next part -------------- A non-text attachment was scrubbed... Name: vimrc Type: application/octet-stream Size: 2201 bytes Desc: not available Url : http://rubyforge.org/pipermail/vim-ruby-devel/attachments/20060405/158f4d97/attachment.obj -------------- next part -------------- -- Eric Hodel - drbrain at segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com From dougkearns at gmail.com Fri Apr 7 23:16:39 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Sat, 8 Apr 2006 13:16:39 +1000 Subject: I've found some ruby runtime errors jump me to a non-existent file In-Reply-To: <20060327001437.GA742@ensemble.local> References: <20060326232950.GA604@ensemble.local> <20060327001437.GA742@ensemble.local> Message-ID: <20060408031639.GC3116@localhost.localdomain> On Sun, Mar 26, 2006 at 04:14:38PM -0800, Sam Roberts wrote: > > Ok, apparently I need "compiler rubyunit". Since doing that in my .vimrc > doesn't work, ruby isn't the only language I work with, I guess a bit of > reading is in order, I'll need to find a place to put > > compiler rubyunit > set makeprg=make If you're always wanting that set for Ruby files you can add it to ~/.vim/after/ftplugin/ruby.vim Regards, Doug From gsinclair at gmail.com Sat Apr 8 20:50:51 2006 From: gsinclair at gmail.com (Gavin Sinclair) Date: Sun, 9 Apr 2006 10:50:51 +1000 Subject: Indenting bug: } Message-ID: *** Forwarded from comp.lang.ruby (message by Vincent Foley) by Gavin Sinclair *** A few months ago, I posted a message in which I said I found a bug in Vim's Ruby indenting. I tried the version from October 7th today, and the bug I had reported has been fixed. However, I uncovered a new one: blocks in arrays. The following code (indented in Emacs) arr = [ MyClass.new { |x| x.some_method }, MyClass.new { |x| x.some_other_method } ] Is indented like this in vim: arr = [ MyClass.new { |x| x.some_method }, MyClass.new { |x| x.some_other_method } ] I know full well that vim script is a horrible language and that getting indenting right must be a very hard task, but I hope someone with enough knowledge of Vim can fix this issue. From now at bitwi.se Sun Apr 9 08:07:38 2006 From: now at bitwi.se (Nikolai Weibull) Date: Sun, 9 Apr 2006 14:07:38 +0200 Subject: Indenting bug: } In-Reply-To: References: Message-ID: On 4/9/06, Gavin Sinclair wrote: [indentation bug] > I know full well that vim script is a horrible language and that > getting indenting right must be a very hard task, but I hope someone > with enough knowledge of Vim can fix this issue. I'm certainly not the one, sorry. I don't have time to fix this at the moment, and I'd say that it is rare enough to not warrant extra effort to fix it; although anyone is free to try. nikolai From segfault at hasno.info Wed Apr 12 00:55:33 2006 From: segfault at hasno.info (Mark Guzman) Date: Wed, 12 Apr 2006 00:55:33 -0400 Subject: [ANN] vim 7 ruby omni-complete v0.2 Message-ID: <443C8845.3050702@hasno.info> Thanks to some outside suggestions and contributions we now have another release. If you missed the original announcement, rbcomplete provides a vim7 omni-completion function (code completion) for vim. It is based on complete.rb, pycomplete.vim and ccomplete.vim. Any input is welcome. Whats New: ------------ At the request of many people, Object's instance methods are no longer included in the completion list, if anyone wants this functionality back I'll make it a configurable. A major contribution provided rbcomplete.vim with better variable identification so the following will properly be completed: a = Time.now b = [0..2] c = ['a','b'] d = {:a=>'test',:b=>'this'} sorry, no "e = c" yet. You can find the file at: http://blog.hasno.info/blog/segfault/dev/2006/04/10/vim-7-ruby-omni-completion.html --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From dougkearns at gmail.com Wed Apr 12 04:39:06 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Wed, 12 Apr 2006 18:39:06 +1000 Subject: [ANN] vim 7 ruby omni-complete v0.2 In-Reply-To: <443C8845.3050702@hasno.info> References: <443C8845.3050702@hasno.info> Message-ID: <20060412083906.GA3122@localhost.localdomain> On Wed, Apr 12, 2006 at 12:55:33AM -0400, Mark Guzman wrote: > Thanks to some outside suggestions and contributions we now have another release. Excellent! Thanks very much for putting in the effort - there's been more than a few people waiting for someone to get to this. > If you missed the original announcement, rbcomplete provides a vim7 > omni-completion function (code completion) for vim. It is based on > complete.rb, pycomplete.vim and ccomplete.vim. Any input is welcome. Would you have any interest in jumping on board here? If nothing else it'll annoy Nikolai... ;-) Regards, Doug From dougkearns at gmail.com Wed Apr 12 04:25:17 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Wed, 12 Apr 2006 18:25:17 +1000 Subject: vim-ruby feels too slow In-Reply-To: <3D19F0BB-A076-48B3-B41F-35337CB8818A@segment7.net> References: <3D19F0BB-A076-48B3-B41F-35337CB8818A@segment7.net> Message-ID: <20060412082517.GB3122@localhost.localdomain> G'day Eric, Sorry for the slow response. On Wed, Apr 05, 2006 at 01:56:37PM -0700, Eric Hodel wrote: > I remember first using vim with ruby highlighting and indenting on a > Pentium 133 Laptop with 40MB of memory something like four years ago. That'd be before I ruined it. ;-) > I remember it being slow, but it was a Pentium 133 with limited > memory. I didn't expect much. > > Now I have a 1.5GHz G4 powerbook with 2GB of memory. > > vim feels slower now than it did on that Pentium 133. The highlighting is certainly slower than it was back then - it's doing considerably more. > I know that the indenting and highlighting are vastly improved for > vim, but it doesn't seem that it should be this slow. Sometimes > opening a ruby file pegs my CPU for five to ten seconds (usually one > of the 100k internal Rails files). Can you send me an example? > Here's a semi-scientific concrete example that just shows starting > up. I'll ignore editing because that's much more difficult to > quantify, but editing can be just as slow in certain sections of > files that take a long time to open. > > To start vim on my machine takes about 1/3 of a second, at best 1/5 > of a second: This seems awfully slow to me... > $ time vim -c ':q' > > real 0m0.216s > user 0m0.070s > sys 0m0.110s > $ time vim -c ':q' > > real 0m0.318s > user 0m0.125s > sys 0m0.153s > > I have a test suite with 391 lines in it for 13k: > > $ wc test/controllers/entry_controller_test.rb > 391 917 13181 test/controllers/entry_controller_test.rb > > There's really nothing fancy in the file. Just a class with a bunch > of methods, a couple of Hashes and strings and so-on. > > If I move all the ruby-specific vim-ruby files aside You don't have any of the distributed files in $VIMRUNTIME? FWIW, I'm not too surprised by these numbers. Do the other similar syntax files perform significantly faster for you? > For real punishment I can give you r2ctestcase.rb from ruby2c. Can you forward this one to me, please? > $ wc r2ctestcase.rb > 1351 3522 51231 r2ctestcase.rb > $ time vim -c ':q' r2ctestcase.rb > > real 0m3.985s > user 0m2.788s > sys 0m0.498s > > In case I'm actually doing something stupid in my .vimrc, here it > is. I don't believe I've changed it substantially since I started > using vim. I can't see anything obvious in there but you can always compare it to vim -u NONE Thanks, Doug From dougkearns at gmail.com Wed Apr 12 04:47:44 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Wed, 12 Apr 2006 18:47:44 +1000 Subject: vim-ruby feels too slow In-Reply-To: <20060412082517.GB3122@localhost.localdomain> References: <3D19F0BB-A076-48B3-B41F-35337CB8818A@segment7.net> <20060412082517.GB3122@localhost.localdomain> Message-ID: <20060412084744.GA14883@localhost.localdomain> On Wed, Apr 12, 2006 at 06:25:17PM +1000, Doug Kearns wrote: > FWIW, I'm not too surprised by these numbers. Do the other similar > syntax files perform significantly faster for you? For example, the runtime/autoload/phpcomplete.vim file in Vim 7 takes almost 4 seconds to open for me. Regards, Doug From hgs at dmu.ac.uk Wed Apr 12 10:57:24 2006 From: hgs at dmu.ac.uk (Hugh Sasse) Date: Wed, 12 Apr 2006 15:57:24 +0100 (WEST) Subject: Updated files requested (fwd) Message-ID: Just in case it gets missed.... Hugh ---------- Forwarded message ---------- Date: Wed, 12 Apr 2006 16:52:02 +0200 From: Bram Moolenaar To: vim-announce at vim.org Subject: Updated files requested This is a message for all people who maintain syntax files, plugins, translations, etc.: Please send me updated files within a week. Thursday 20 April the latest. Then I can make a final beta testing version for Vim 7. I don't search around on the internet for updated files, please e-mail them to me. This is also a last chance to make improvements. All changes need to be tested! If you are not a maintainer but know there is a newer version available, or know about a problem that needs to be fixed, please contact the maintainer directly. They might not all read this message. -- Never go to the toilet in a paperless office. /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://www.ICCF.nl /// From segfault at hasno.info Thu Apr 13 09:23:20 2006 From: segfault at hasno.info (Mark Guzman) Date: Thu, 13 Apr 2006 09:23:20 -0400 Subject: [ANN] vim 7 ruby omni-complete v0.2 In-Reply-To: <20060412083906.GA3122@localhost.localdomain> References: <443C8845.3050702@hasno.info> <20060412083906.GA3122@localhost.localdomain> Message-ID: <443E50C8.7090006@hasno.info> I'd be happy to help out. --mark Doug Kearns wrote: > > > Would you have any interest in jumping on board here? If nothing else > it'll annoy Nikolai... ;-) > > Regards, > Doug > -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From dougkearns at gmail.com Thu Apr 13 09:48:43 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Thu, 13 Apr 2006 23:48:43 +1000 Subject: [ANN] vim 7 ruby omni-complete v0.2 In-Reply-To: <443E50C8.7090006@hasno.info> References: <443C8845.3050702@hasno.info> <20060412083906.GA3122@localhost.localdomain> <443E50C8.7090006@hasno.info> Message-ID: <20060413134843.GK18275@localhost.localdomain> On Thu, Apr 13, 2006 at 09:23:20AM -0400, Mark Guzman wrote: > I'd be happy to help out. Thanks. Do you have a rubyforge account so I can add you to the project? Regards, Doug From segfault at hasno.info Thu Apr 13 10:55:23 2006 From: segfault at hasno.info (Mark Guzman) Date: Thu, 13 Apr 2006 10:55:23 -0400 Subject: [ANN] vim 7 ruby omni-complete v0.2 In-Reply-To: <20060413134843.GK18275@localhost.localdomain> References: <443C8845.3050702@hasno.info> <20060412083906.GA3122@localhost.localdomain> <443E50C8.7090006@hasno.info> <20060413134843.GK18275@localhost.localdomain> Message-ID: <443E665B.3090201@hasno.info> segy --mark Doug Kearns wrote: > Thanks. Do you have a rubyforge account so I can add you to the project? > > Regards, > Doug > -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From dougkearns at gmail.com Thu Apr 13 11:41:14 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Fri, 14 Apr 2006 01:41:14 +1000 Subject: [ANN] vim 7 ruby omni-complete v0.2 In-Reply-To: <443E665B.3090201@hasno.info> References: <443C8845.3050702@hasno.info> <20060412083906.GA3122@localhost.localdomain> <443E50C8.7090006@hasno.info> <20060413134843.GK18275@localhost.localdomain> <443E665B.3090201@hasno.info> Message-ID: <20060413154114.GN18275@localhost.localdomain> On Thu, Apr 13, 2006 at 10:55:23AM -0400, Mark Guzman wrote: > segy Done. Did you intend including the completion script in Vim 7? Regards, Doug > Doug Kearns wrote: > > Thanks. Do you have a rubyforge account so I can add you to the project? > > > > Regards, > > Doug > > > From segfault at hasno.info Fri Apr 14 00:36:32 2006 From: segfault at hasno.info (Mark Guzman) Date: Fri, 14 Apr 2006 00:36:32 -0400 Subject: [ANN] vim 7 ruby omni-complete v0.2 In-Reply-To: <20060413154114.GN18275@localhost.localdomain> References: <443C8845.3050702@hasno.info> <20060412083906.GA3122@localhost.localdomain> <443E50C8.7090006@hasno.info> <20060413134843.GK18275@localhost.localdomain> <443E665B.3090201@hasno.info> <20060413154114.GN18275@localhost.localdomain> Message-ID: <443F26D0.9020508@hasno.info> Yes, I've emailed Bram about it. Looks like we're going with rubycomplete.vim as the name, matching the ftplugin naming. I'm currently trying to modify it to add tag support and switch over to using the new dictionaries. --mark Doug Kearns wrote: > Done. > > Did you intend including the completion script in Vim 7? > -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From dougkearns at gmail.com Fri Apr 14 02:41:16 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Fri, 14 Apr 2006 16:41:16 +1000 Subject: [ANN] vim 7 ruby omni-complete v0.2 In-Reply-To: <443F26D0.9020508@hasno.info> References: <443C8845.3050702@hasno.info> <20060412083906.GA3122@localhost.localdomain> <443E50C8.7090006@hasno.info> <20060413134843.GK18275@localhost.localdomain> <443E665B.3090201@hasno.info> <20060413154114.GN18275@localhost.localdomain> <443F26D0.9020508@hasno.info> Message-ID: <20060414064116.GT18275@localhost.localdomain> On Fri, Apr 14, 2006 at 12:36:32AM -0400, Mark Guzman wrote: > Yes, I've emailed Bram about it. Looks like we're going with > rubycomplete.vim as the name, matching the ftplugin naming. I'm > currently trying to modify it to add tag support and switch over to > using the new dictionaries. Feel free to stick it in CVS whenever you like. There's already an autoload directory there I think - I went to start on it one night but didn't get very far. ;-) Regards, Doug From segfault at hasno.info Fri Apr 14 16:00:47 2006 From: segfault at hasno.info (Mark Guzman) Date: Fri, 14 Apr 2006 16:00:47 -0400 Subject: [ANN] vim 7 ruby omni-complete v0.2 In-Reply-To: <20060414064116.GT18275@localhost.localdomain> References: <443C8845.3050702@hasno.info> <20060412083906.GA3122@localhost.localdomain> <443E50C8.7090006@hasno.info> <20060413134843.GK18275@localhost.localdomain> <443E665B.3090201@hasno.info> <20060413154114.GN18275@localhost.localdomain> <443F26D0.9020508@hasno.info> <20060414064116.GT18275@localhost.localdomain> Message-ID: <443FFF6F.5060009@hasno.info> Doug Kearns wrote: > Feel free to stick it in CVS whenever you like. There's already an > autoload directory there I think - I went to start on it one night but > didn't get very far. ;-) > Checked in and seemingly working. I modified the ftplugin to set the omni func also. If possible could we pass that on to Bram for inclusion w/ vim7? I've contacted him about rbcomplete (now rubycomplete per the discussion on vim-dev) and he mentioned the ftplugin. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From dougkearns at gmail.com Sat Apr 15 08:38:59 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Sat, 15 Apr 2006 22:38:59 +1000 Subject: [ANN] vim 7 ruby omni-complete v0.2 In-Reply-To: <443FFF6F.5060009@hasno.info> References: <443C8845.3050702@hasno.info> <20060412083906.GA3122@localhost.localdomain> <443E50C8.7090006@hasno.info> <20060413134843.GK18275@localhost.localdomain> <443E665B.3090201@hasno.info> <20060413154114.GN18275@localhost.localdomain> <443F26D0.9020508@hasno.info> <20060414064116.GT18275@localhost.localdomain> <443FFF6F.5060009@hasno.info> Message-ID: <20060415123859.GB4763@localhost.localdomain> On Fri, Apr 14, 2006 at 04:00:47PM -0400, Mark Guzman wrote: > Doug Kearns wrote: > > Feel free to stick it in CVS whenever you like. There's already an > > autoload directory there I think - I went to start on it one night but > > didn't get very far. ;-) > > > Checked in and seemingly working. I modified the ftplugin to set the > omni func also. Thanks. I just had to update the name of rbcomplete#Complete to match the new script file name. > If possible could we pass that on to Bram for inclusion > w/ vim7? I've contacted him about rbcomplete (now rubycomplete per the > discussion on vim-dev) and he mentioned the ftplugin. Done. I've sent him the whole lot... Thanks, Doug From dougkearns at gmail.com Sat Apr 15 10:26:40 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Sun, 16 Apr 2006 00:26:40 +1000 Subject: Updated files requested (fwd) In-Reply-To: References: Message-ID: <20060415142639.GA19292@localhost.localdomain> On Wed, Apr 12, 2006 at 03:57:24PM +0100, Hugh Sasse wrote: > Just in case it gets missed.... Thanks. I've forward on the latest...not much in the way of changes to existing files. ;-) Regards, Doug From dougkearns at gmail.com Sat Apr 15 10:40:07 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Sun, 16 Apr 2006 00:40:07 +1000 Subject: rubycomplete.vim leading whitespace bug? Message-ID: <20060415144007.GB19292@localhost.localdomain> Mark, I've just started playing with your omni completion function and noticed that the completion results differ depending on whether what is being completed has leading whitespace. Eg. :foobar. :foobar. The first offers the correct methods but the second offers me a list of 'constants'. Any ideas? Thanks, Doug From dougkearns at gmail.com Sun Apr 16 06:31:34 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Sun, 16 Apr 2006 20:31:34 +1000 Subject: rubycomplete.vim leading whitespace bug? In-Reply-To: <20060415144007.GB19292@localhost.localdomain> References: <20060415144007.GB19292@localhost.localdomain> Message-ID: <20060416103134.GA11143@localhost.localdomain> On Sun, Apr 16, 2006 at 12:40:07AM +1000, Doug Kearns wrote: > Mark, > > I've just started playing with your omni completion function and noticed > that the completion results differ depending on whether what is being > completed has leading whitespace. > > Eg. > :foobar. > :foobar. > > The first offers the correct methods but the second offers me a list of > 'constants'. > > Any ideas? Well I had a very quick look and it seems as though cWORD is not being expanded properly, at the start of get_completions(), when there is leading whitespace. It is always returning an empty string. Regards, Doug From segfault at hasno.info Sun Apr 16 14:14:24 2006 From: segfault at hasno.info (Mark Guzman) Date: Sun, 16 Apr 2006 14:14:24 -0400 Subject: rubycomplete.vim leading whitespace bug? In-Reply-To: <20060416103134.GA11143@localhost.localdomain> References: <20060415144007.GB19292@localhost.localdomain> <20060416103134.GA11143@localhost.localdomain> Message-ID: <44428980.307@hasno.info> Doug Kearns wrote: > Well I had a very quick look and it seems as though cWORD is not being > expanded properly, at the start of get_completions(), when there is > leading whitespace. It is always returning an empty string. > Yup, noticed that. I have a fix, but I'm attempting to add support for classes defined in the current buffer. Once thats going I'll check it all in. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From segfault at hasno.info Sun Apr 16 17:43:58 2006 From: segfault at hasno.info (Mark Guzman) Date: Sun, 16 Apr 2006 17:43:58 -0400 Subject: rubycomplete update Message-ID: <4442BA9E.1060104@hasno.info> I've committed my changes adding support for completion of classes defined in the current buffer. The commit also adds the work around for the cWORD problem Doug found. I'm going to send an email to the rails/ruby/vim lists about it and notifying them that they should check vim-ruby. The next stop for rubycomplete is module support and rails integration. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From now at bitwi.se Sun Apr 16 17:48:12 2006 From: now at bitwi.se (Nikolai Weibull) Date: Sun, 16 Apr 2006 23:48:12 +0200 Subject: rubycomplete update In-Reply-To: <4442BA9E.1060104@hasno.info> References: <4442BA9E.1060104@hasno.info> Message-ID: On 4/16/06, Mark Guzman wrote: > The next stop for rubycomplete is module support > and rails integration. What exactly does "rails integration" mean? nikolai From now at bitwi.se Sun Apr 16 17:52:07 2006 From: now at bitwi.se (Nikolai Weibull) Date: Sun, 16 Apr 2006 23:52:07 +0200 Subject: rubycomplete update In-Reply-To: <4442BA9E.1060104@hasno.info> References: <4442BA9E.1060104@hasno.info> Message-ID: On 4/16/06, Mark Guzman wrote: > The commit also adds the work around for the cWORD problem Doug found. Actually, this isn't the right solution I think. The whole cWORD problem happens whenever a symbol is preceded by whitespace, not only when at the beginning of a line. One solution that works is calling VIM::command('normal! h') if the string is empty and then expanding. That way the cursor will be over the dot in ":x." and it will expand to the correct string. I really think that this should be fixed inside Vim instead, but Bram can't replicate our issue, so perhaps there something more to it than a simple bug in expand(). nikolai From segfault at hasno.info Sun Apr 16 19:30:45 2006 From: segfault at hasno.info (Mark Guzman) Date: Sun, 16 Apr 2006 19:30:45 -0400 Subject: rubycomplete update In-Reply-To: References: <4442BA9E.1060104@hasno.info> Message-ID: <4442D3A5.7040605@hasno.info> Nikolai Weibull wrote: > Actually, this isn't the right solution I think. The whole cWORD > problem happens whenever a symbol is preceded by whitespace, not only > when at the beginning of a line. One solution that works is calling > VIM::command('normal! h') if the string is empty and then expanding. > That way the cursor will be over the dot in ":x." and it will expand > to the correct string. I really think that this should be fixed > inside Vim instead, but Bram can't replicate our issue, so perhaps > there something more to it than a simple bug in expand(). > > nikolai > cWORD worked at the begining. I've added code to left trim the string and check if its empty at that point. If cWORD is still showing the same problem then the ruby code will grab the whole current line and attempt to operate on that instead. Once there is a solution to the cWORD bug, the code will cease to operate. It does indeed work, as I've used it while testing the cWORD bug and the in-buffer class completion stuff. I may take a crack at fixing the cWORD issue in vim, once i grab the latest snapshot. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From segfault at hasno.info Sun Apr 16 19:32:56 2006 From: segfault at hasno.info (Mark Guzman) Date: Sun, 16 Apr 2006 19:32:56 -0400 Subject: rubycomplete update In-Reply-To: References: <4442BA9E.1060104@hasno.info> Message-ID: <4442D428.2060307@hasno.info> Nikolai Weibull wrote: > What exactly does "rails integration" mean? > I'm going to have vim check if its operating on a file that is part of a rails project (through the detection of default files in paths). If so it will attempt to load an environment similar to that of script/console, allowing for completion of activerecord classes and class variables in eruby templates (hopefully). --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From segfault at hasno.info Mon Apr 17 09:40:36 2006 From: segfault at hasno.info (Mark Guzman) Date: Mon, 17 Apr 2006 09:40:36 -0400 Subject: rubycomplete update In-Reply-To: <4442D428.2060307@hasno.info> References: <4442BA9E.1060104@hasno.info> <4442D428.2060307@hasno.info> Message-ID: <44439AD4.2040208@hasno.info> On my long drive home from long island (traffic sucked), I thought of two issues that I'd like to tackle. One issue is blocking my notifying anyone about the changes. Class dependencies within a single file would break the in-buffer completion. In addition the current function does not handle classes that are inheriting from a parent. The other issue comes from completion within a class definition. Say you are working on class Foo, method Bar and want to complete a member of the current class. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From segfault at hasno.info Mon Apr 17 09:46:12 2006 From: segfault at hasno.info (Mark Guzman) Date: Mon, 17 Apr 2006 09:46:12 -0400 Subject: rubycomplete update In-Reply-To: References: <4442BA9E.1060104@hasno.info> Message-ID: <44439C24.6030805@hasno.info> Nikolai Weibull wrote: > Actually, this isn't the right solution I think. The whole cWORD > problem happens whenever a symbol is preceded by whitespace, not only > when at the beginning of a line. One solution that works is calling > VIM::command('normal! h') if the string is empty and then expanding. > That way the cursor will be over the dot in ":x." and it will expand > to the correct string. I really think that this should be fixed > inside Vim instead, but Bram can't replicate our issue, so perhaps > there something more to it than a simple bug in expand(). > I thought a little more about the problem, and I still don't want to move the cursor. I believe using the ruby-side buffer stuff we can get the current cursor position so we could provide the same functionality that cWORD was providing. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From dougkearns at gmail.com Mon Apr 17 08:00:35 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Mon, 17 Apr 2006 22:00:35 +1000 Subject: rubycomplete update In-Reply-To: References: <4442BA9E.1060104@hasno.info> Message-ID: <20060417120035.GA3178@localhost.localdomain> On Sun, Apr 16, 2006 at 11:52:07PM +0200, Nikolai Weibull wrote: > On 4/16/06, Mark Guzman wrote: > > The commit also adds the work around for the cWORD problem Doug found. > > Actually, this isn't the right solution I think. The whole cWORD > problem happens whenever a symbol is preceded by whitespace, not only > when at the beginning of a line. One solution that works is calling > VIM::command('normal! h') if the string is empty and then expanding. > That way the cursor will be over the dot in ":x." and it will expand > to the correct string. I really think that this should be fixed > inside Vim instead, but Bram can't replicate our issue, so perhaps > there something more to it than a simple bug in expand(). He can now and is fixing it. Apparently it requires 'encoding' to be set to "utf-8". Regards, Doug From dougkearns at gmail.com Mon Apr 17 08:17:46 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Mon, 17 Apr 2006 22:17:46 +1000 Subject: rubycomplete documentation Message-ID: <20060417121746.GB3178@localhost.localdomain> Mark, Bram asked me about adding some documentation for the omni function. I said I would but haven't got around to it yet. If you're so inclined please feel free to do so. If not, I'll take a look at it over the next few days...otherwise known as Real Soon Now (TM) Thanks, Doug From segfault at hasno.info Mon Apr 17 10:44:33 2006 From: segfault at hasno.info (Mark Guzman) Date: Mon, 17 Apr 2006 10:44:33 -0400 Subject: rubycomplete update In-Reply-To: <20060417120035.GA3178@localhost.localdomain> References: <4442BA9E.1060104@hasno.info> <20060417120035.GA3178@localhost.localdomain> Message-ID: <4443A9D1.4080003@hasno.info> Doug Kearns wrote: > He can now and is fixing it. Apparently it requires 'encoding' to be set > to "utf-8". > i18n bites me in the bum again. Well I guess I'll be taking out my little hack. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From segfault at hasno.info Mon Apr 17 10:47:43 2006 From: segfault at hasno.info (Mark Guzman) Date: Mon, 17 Apr 2006 10:47:43 -0400 Subject: rubycomplete documentation In-Reply-To: <20060417121746.GB3178@localhost.localdomain> References: <20060417121746.GB3178@localhost.localdomain> Message-ID: <4443AA8F.60805@hasno.info> Doug Kearns wrote: > Bram asked me about adding some documentation for the omni function. I > said I would but haven't got around to it yet. If you're so inclined > please feel free to do so. If not, I'll take a look at it over the next > few days...otherwise known as Real Soon Now (TM) > I can take a crack at it, depending on the issues I fix. I assume I can find some examples of what this should look like in the existing docs... --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From segfault at hasno.info Mon Apr 17 11:05:34 2006 From: segfault at hasno.info (Mark Guzman) Date: Mon, 17 Apr 2006 11:05:34 -0400 Subject: ideas.. Message-ID: <4443AEBE.9040006@hasno.info> I've stated a few different things I'd like to add to rubycomplete. I'm just wondering what you guys would like it to do, and where you guys would like to see it going. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From gsinclair at gmail.com Mon Apr 17 18:22:40 2006 From: gsinclair at gmail.com (Gavin Sinclair) Date: Tue, 18 Apr 2006 08:22:40 +1000 Subject: ideas.. In-Reply-To: <4443AEBE.9040006@hasno.info> References: <4443AEBE.9040006@hasno.info> Message-ID: On 4/18/06, Mark Guzman wrote: > I've stated a few different things I'd like to add to rubycomplete. I'm > just wondering what you guys would like it to do, and where you guys > would like to see it going. Heh, I've yet to see it in action! Just looked at the Vim site to get the latest on Vim 7. There's a lot of mention of "tab pages". What are they? Gavin From dougkearns at gmail.com Tue Apr 18 04:01:56 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Tue, 18 Apr 2006 18:01:56 +1000 Subject: rubycomplete documentation In-Reply-To: <4443AA8F.60805@hasno.info> References: <20060417121746.GB3178@localhost.localdomain> <4443AA8F.60805@hasno.info> Message-ID: <20060418080156.GA4857@localhost.localdomain> On Mon, Apr 17, 2006 at 10:47:43AM -0400, Mark Guzman wrote: > Doug Kearns wrote: > > Bram asked me about adding some documentation for the omni function. I > > said I would but haven't got around to it yet. If you're so inclined > > please feel free to do so. If not, I'll take a look at it over the next > > few days...otherwise known as Real Soon Now (TM) > > > I can take a crack at it, depending on the issues I fix. I assume I can > find some examples of what this should look like in the existing docs... Yes, take a look at :help ft-c-omni etc for examples. Thanks, Doug From dougkearns at gmail.com Tue Apr 18 04:07:55 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Tue, 18 Apr 2006 18:07:55 +1000 Subject: Release Coordinator Message-ID: <20060418080755.GB4857@localhost.localdomain> I've added a Release Coordinator header to the runtime files. This is not an indication that my megalomania is now running unchecked but rather in response to a request from Bram. Regards, Doug From dougkearns at gmail.com Wed Apr 19 07:28:51 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Wed, 19 Apr 2006 21:28:51 +1000 Subject: ideas.. In-Reply-To: <4443AEBE.9040006@hasno.info> References: <4443AEBE.9040006@hasno.info> Message-ID: <20060419112851.GA8671@localhost.localdomain> On Mon, Apr 17, 2006 at 11:05:34AM -0400, Mark Guzman wrote: > I've stated a few different things I'd like to add to rubycomplete. I'm > just wondering what you guys would like it to do, and where you guys > would like to see it going. If it's as good as the completion in irb then I'm happy... I wonder if it's worth hooking into rdoc, or similar, and displaying extra information in the preview window? Regards, Doug From dougkearns at gmail.com Wed Apr 19 07:39:59 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Wed, 19 Apr 2006 21:39:59 +1000 Subject: rubycomplete error message highlighting Message-ID: <20060419113959.GB8671@localhost.localdomain> Is it worth doing something like this? I just tried it on another box and didn't notice this message at first. Regards, Doug --- autoload/rubycomplete.vim 2006-04-19 18:03:11.000000000 +1000 +++ /home/doug/.vim/autoload/rubycomplete.vim 2006-04-19 21:38:58.000000000 +1000 @@ -11,7 +11,9 @@ " ---------------------------------------------------------------------------- if !has('ruby') + echohl ErrorMsg echo "Error: Required vim compiled with +ruby" + echohl None finish endif From dougkearns at gmail.com Wed Apr 19 07:43:06 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Wed, 19 Apr 2006 21:43:06 +1000 Subject: rubycomplete update In-Reply-To: <44439AD4.2040208@hasno.info> References: <4442BA9E.1060104@hasno.info> <4442D428.2060307@hasno.info> <44439AD4.2040208@hasno.info> Message-ID: <20060419114306.GC8671@localhost.localdomain> On Mon, Apr 17, 2006 at 09:40:36AM -0400, Mark Guzman wrote: > On my long drive home from long island (traffic sucked), I thought of > two issues that I'd like to tackle. One issue is blocking my notifying > anyone about the changes. I'm not sure I understand what you mean here? Thanks, Doug From segfault at hasno.info Wed Apr 19 09:11:34 2006 From: segfault at hasno.info (Mark Guzman) Date: Wed, 19 Apr 2006 09:11:34 -0400 Subject: rubycomplete update In-Reply-To: <20060419114306.GC8671@localhost.localdomain> References: <4442BA9E.1060104@hasno.info> <4442D428.2060307@hasno.info> <44439AD4.2040208@hasno.info> <20060419114306.GC8671@localhost.localdomain> Message-ID: <44463706.3020901@hasno.info> Doug Kearns wrote: > On Mon, Apr 17, 2006 at 09:40:36AM -0400, Mark Guzman wrote: > >> On my long drive home from long island (traffic sucked), I thought of >> two issues that I'd like to tackle. One issue is blocking my notifying >> anyone about the changes. >> > > I'm not sure I understand what you mean here? > > Thanks, > Doug > I was going to send an announcement message to the ruby lists, listing the new features, pointing them a vim-ruby, and such. I didn't like the idea of notifying people without cleaning up those issues. On the bright side, I've checked in a version that will load inheritance dependencies and modules. Now I just need to test that a bit more and figure out how I'd like to handle completing things while working inside an object definition. I'm thinking I can use the same regex's that are picking up the class definitions, if the current cursor pos falls between the start and end then we know what "this" would be referring to. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From dougkearns at gmail.com Wed Apr 19 13:12:40 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Thu, 20 Apr 2006 03:12:40 +1000 Subject: rubycomplete update In-Reply-To: <44463706.3020901@hasno.info> References: <4442BA9E.1060104@hasno.info> <4442D428.2060307@hasno.info> <44439AD4.2040208@hasno.info> <20060419114306.GC8671@localhost.localdomain> <44463706.3020901@hasno.info> Message-ID: <20060419171240.GD8671@localhost.localdomain> On Wed, Apr 19, 2006 at 09:11:34AM -0400, Mark Guzman wrote: > I was going to send an announcement message to the ruby lists, listing > the new features, pointing them a vim-ruby, and such. I didn't like the > idea of notifying people without cleaning up those issues. Thanks, I was misreading it as you felt you couldn't notify the wider world of any changes because of our release process. :-) Would it help if we made a release in an effort to encourage people to play around with the completion script and make contributions? Regards, Doug From now at bitwi.se Wed Apr 19 14:41:20 2006 From: now at bitwi.se (Nikolai Weibull) Date: Wed, 19 Apr 2006 20:41:20 +0200 Subject: Please remember to send updated files to Bram by tomorrow Message-ID: The deadline has been set for tomorrow, so please remember to send out any updated files to Bram as soon as possible. We don't want another 6.3 mishap. That is all. nikolai From now at bitwi.se Wed Apr 19 17:16:39 2006 From: now at bitwi.se (Nikolai Weibull) Date: Wed, 19 Apr 2006 23:16:39 +0200 Subject: Indenting bug: } In-Reply-To: References: Message-ID: On 4/9/06, Nikolai Weibull wrote: > On 4/9/06, Gavin Sinclair wrote: > [indentation bug] > > I know full well that vim script is a horrible language and that > > getting indenting right must be a very hard task, but I hope someone > > with enough knowledge of Vim can fix this issue. > > I'm certainly not the one, sorry. I don't have time to fix this at > the moment, and I'd say that it is rare enough to not warrant extra > effort to fix it; although anyone is free to try. Actually, if I find the time, I might rewrite it, modelling it after the code in ruby-mode.el. Then people can't say "but it works in Emacs...". nikolai From segfault at hasno.info Wed Apr 19 16:52:46 2006 From: segfault at hasno.info (Mark Guzman) Date: Wed, 19 Apr 2006 16:52:46 -0400 Subject: preliminary rubycomplete documentation for review Message-ID: <4446A31E.203@hasno.info> Everyone, Please take a moment and look over ft-ruby-omni in the attached file. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: insert.txt Url: http://rubyforge.org/pipermail/vim-ruby-devel/attachments/20060419/a9a0901e/attachment-0001.txt From gsinclair at gmail.com Wed Apr 19 21:11:51 2006 From: gsinclair at gmail.com (Gavin Sinclair) Date: Thu, 20 Apr 2006 11:11:51 +1000 Subject: preliminary rubycomplete documentation for review In-Reply-To: <4446A31E.203@hasno.info> References: <4446A31E.203@hasno.info> Message-ID: On 4/20/06, Mark Guzman wrote: > Everyone, > Please take a moment and look over ft-ruby-omni in the attached file. > --mark My suggested replacement for the relevant section is below. I aimed for a style that's consistent with the rest of the Vim online help. It should be viewed in Vim with ':set filetype=help' to see the highlighting. BTW Mark, your prelim documentation mentioned that object specific completion would be done after any of {. : ::}. What is ":" supposed to do? Cheers, Gavin P.S. Please only send the relevant text in future. The attachment before was so large that Mailman asked me to approve it before it could be posted to the list! == begin RUBY *ft-ruby-omni* Completion of Ruby code requires that vim be built with |+ruby|. Ruby completion will parse your buffer on demand in order to provide a list of completions. These completions will be drawn from modules loaded by 'require' and modules defined in the current buffer. The completions provided by CTRL-X CTRL-O are sensitive to the context: CONTEXT COMPLETIONS PROVIDED ~ 1. Not inside a class definition Classes, constants and globals 2. Inside a class definition Methods or constants defined in the class 3. After '.' or '::' Methods applicable to the object being dereferenced Notes: - Vim will load/evaluate code in order to provide completions. This may cause some code execution, which may be a concern. - In context 2 above, anonymous classes are not supported. - In context 3 above, Vim will attempt to determine the methods supported by the object. == end From dougkearns at gmail.com Thu Apr 20 02:35:22 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Thu, 20 Apr 2006 16:35:22 +1000 Subject: Indenting bug: } In-Reply-To: References: Message-ID: <20060420063522.GE8671@localhost.localdomain> On Wed, Apr 19, 2006 at 11:16:39PM +0200, Nikolai Weibull wrote: > On 4/9/06, Nikolai Weibull wrote: > > On 4/9/06, Gavin Sinclair wrote: > > [indentation bug] > > > I know full well that vim script is a horrible language and that > > > getting indenting right must be a very hard task, but I hope someone > > > with enough knowledge of Vim can fix this issue. > > > > I'm certainly not the one, sorry. I don't have time to fix this at > > the moment, and I'd say that it is rare enough to not warrant extra > > effort to fix it; although anyone is free to try. > > Actually, if I find the time, I might rewrite it, modelling it after > the code in ruby-mode.el. Then people can't say "but it works in > Emacs...". But then the Emacs users will be less likely to annoy everyone with "but it works in Vim". Regards, Doug From segfault at hasno.info Thu Apr 20 02:42:56 2006 From: segfault at hasno.info (Mark Guzman) Date: Thu, 20 Apr 2006 02:42:56 -0400 Subject: current version Message-ID: <44472D70.7000200@hasno.info> I've updated my site and posted announcement messages to the rails & ruby-talk mailing lists regarding a new released version. It's checked into cvs, and seems to complete in-buffer classes properly along with initial rails support. There was a bug due to apostrophes when completing symbols globally that has now been fixed. In addition I got a patch adding smarter Regex detection which has been included. Initial rails support will load the rails environment within vim when a completion is requested from a file in a rails project. This is optional and off by default. Loading rails takes a little bit of time so I felt it was best left up to the end user to enable knowingly. The next steps as I seem them involve modifying the code to take advantage of the dictionary we're using to return the completions. Information about types and descriptions can be added to the menu. This will require the retooling of the irb/complete section of code. When is the next release of vim-ruby? --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From segfault at hasno.info Thu Apr 20 02:49:09 2006 From: segfault at hasno.info (Mark Guzman) Date: Thu, 20 Apr 2006 02:49:09 -0400 Subject: preliminary rubycomplete documentation for review In-Reply-To: References: <4446A31E.203@hasno.info> Message-ID: <44472EE5.5030002@hasno.info> Gavin Sinclair wrote: > > > My suggested replacement for the relevant section is below. I aimed > for a style that's consistent with the rest of the Vim online help. > > It should be viewed in Vim with ':set filetype=help' to see the highlighting. > > BTW Mark, your prelim documentation mentioned that object specific > completion would be done after any of {. : ::}. What is ":" supposed > to do? > > Cheers, > Gavin > > P.S. Please only send the relevant text in future. The attachment > before was so large that Mailman asked me to approve it before it > could be posted to the list! > Gavin, : will complete symbols. If done with no preceding text it will provide a list of global symbols. Sorry about the file-size, I'll snip the segment next time. Here's a slightly updated version of the doc: == begin RUBY *ft-ruby-omni* Completion of Ruby code requires that vim be built with |+ruby|. Ruby completion will parse your buffer on demand in order to provide a list of completions. These completions will be drawn from modules loaded by 'require' and modules defined in the current buffer. The completions provided by CTRL-X CTRL-O are sensitive to the context: CONTEXT COMPLETIONS PROVIDED ~ 1. Not inside a class definition Classes, constants and globals 2. Inside a class definition Methods or constants defined in the class 3. After '.', '::' or ':' Methods applicable to the object being dereferenced, Symbols in the case of ':' Notes: - Vim will load/evaluate code in order to provide completions. This may cause some code execution, which may be a concern. - In context 2 above, anonymous classes are not supported. - In context 3 above, Vim will attempt to determine the methods supported by the object. - Vim can detect and load the Rails environment for files within a rails project. The feature is disabled by default, to enable it add let g:rubycomplete_rails = 1 to your vimrc == end -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From dougkearns at gmail.com Thu Apr 20 02:51:57 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Thu, 20 Apr 2006 16:51:57 +1000 Subject: current version In-Reply-To: <44472D70.7000200@hasno.info> References: <44472D70.7000200@hasno.info> Message-ID: <20060420065157.GF8671@localhost.localdomain> On Thu, Apr 20, 2006 at 02:42:56AM -0400, Mark Guzman wrote: > When is the next release of vim-ruby? When you're ready. If you like I can make a release in the next 6 hours or so... Regards, Doug PS. You'll know this being a rails user... I just added filetype detection for RJS and RHTML files. From a very quick look it seems they only ever contain plain ruby code? Are there any other 'filetypes' that need supporting? From segfault at hasno.info Thu Apr 20 02:56:22 2006 From: segfault at hasno.info (Mark Guzman) Date: Thu, 20 Apr 2006 02:56:22 -0400 Subject: current version In-Reply-To: <20060420065157.GF8671@localhost.localdomain> References: <44472D70.7000200@hasno.info> <20060420065157.GF8671@localhost.localdomain> Message-ID: <44473096.5020004@hasno.info> Doug Kearns wrote: > On Thu, Apr 20, 2006 at 02:42:56AM -0400, Mark Guzman wrote: > > > > >> When is the next release of vim-ruby? >> > > When you're ready. If you like I can make a release in the next 6 hours > or so... > > Regards, > Doug > > PS. You'll know this being a rails user... I just added filetype > detection for RJS and RHTML files. From a very quick look it seems > they only ever contain plain ruby code? > > Are there any other 'filetypes' that need supporting? > No other filetypes that I can think of. I'm game for a release, anything else I can do? --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From dougkearns at gmail.com Thu Apr 20 03:06:51 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Thu, 20 Apr 2006 17:06:51 +1000 Subject: current version In-Reply-To: <44472D70.7000200@hasno.info> References: <44472D70.7000200@hasno.info> Message-ID: <20060420070651.GG8671@localhost.localdomain> Mark, I'm not ignoring most of you're more detailed questions. I just haven't had a good chance to have a proper look yet. On Thu, Apr 20, 2006 at 02:42:56AM -0400, Mark Guzman wrote: > I've updated my site and posted announcement messages to the rails & > ruby-talk mailing lists regarding a new released version. > It's checked into cvs, and seems to complete in-buffer classes properly > along with initial rails support. Should Foobar be the only string offered for completion below? It's not currently working for me. It just offers up the entire class/constant/global list - the partial "Fo" is being ignored. class Foobar; end x = Fo| Would it be better if this class/constant/global list was initially sorted? Regards, Doug From dougkearns at gmail.com Thu Apr 20 03:11:09 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Thu, 20 Apr 2006 17:11:09 +1000 Subject: current version In-Reply-To: <44473096.5020004@hasno.info> References: <44472D70.7000200@hasno.info> <20060420065157.GF8671@localhost.localdomain> <44473096.5020004@hasno.info> Message-ID: <20060420071109.GH8671@localhost.localdomain> On Thu, Apr 20, 2006 at 02:56:22AM -0400, Mark Guzman wrote: > Doug Kearns wrote: > > Are there any other 'filetypes' that need supporting? > > > No other filetypes that I can think of. I'm game for a release, anything > else I can do? Not really, thanks. Just bask in the post-release glory, or field the inevitable barrage of questions on ruby-talk. ;-) Thanks, Doug From segfault at hasno.info Thu Apr 20 03:15:34 2006 From: segfault at hasno.info (Mark Guzman) Date: Thu, 20 Apr 2006 03:15:34 -0400 Subject: current version In-Reply-To: <20060420070651.GG8671@localhost.localdomain> References: <44472D70.7000200@hasno.info> <20060420070651.GG8671@localhost.localdomain> Message-ID: <44473516.2020804@hasno.info> Doug Kearns wrote: > Should Foobar be the only string offered for completion below? It's not > currently working for me. It just offers up the entire > class/constant/global list - the partial "Fo" is being ignored. > > class Foobar; end > x = Fo| > > Would it be better if this class/constant/global list was initially > sorted? > Without loading every class in the buffer that can't be completed. Classes are currently loaded on-demand by name. I wasn't sure if I should go ahead and load everything or load on-demand. The single line def is probably an issue for the regex thats being used too. I'll look into that bit. Should I attempt to load all of the in-buffer classes in the case your describing? -- mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From dougkearns at gmail.com Thu Apr 20 03:31:53 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Thu, 20 Apr 2006 17:31:53 +1000 Subject: current version In-Reply-To: <44473516.2020804@hasno.info> References: <44472D70.7000200@hasno.info> <20060420070651.GG8671@localhost.localdomain> <44473516.2020804@hasno.info> Message-ID: <20060420073153.GA10878@localhost.localdomain> On Thu, Apr 20, 2006 at 03:15:34AM -0400, Mark Guzman wrote: > Doug Kearns wrote: > > Should Foobar be the only string offered for completion below? It's not > > currently working for me. It just offers up the entire > > class/constant/global list - the partial "Fo" is being ignored. > > > > class Foobar; end > > x = Fo| > > > > Would it be better if this class/constant/global list was initially > > sorted? > > > Without loading every class in the buffer that can't be completed. Hmmm, it's already in the list? It seems the "Fo" just isn't being passed as the partial match. What am I missing? > Should I attempt to load all of the in-buffer classes in the case your > describing? Seems reasonable to me...as a user. ;-) Thanks, Doug From segfault at hasno.info Thu Apr 20 03:40:53 2006 From: segfault at hasno.info (Mark Guzman) Date: Thu, 20 Apr 2006 03:40:53 -0400 Subject: current version In-Reply-To: <20060420073153.GA10878@localhost.localdomain> References: <44472D70.7000200@hasno.info> <20060420070651.GG8671@localhost.localdomain> <44473516.2020804@hasno.info> <20060420073153.GA10878@localhost.localdomain> Message-ID: <44473B05.6010004@hasno.info> Doug Kearns wrote: > > Hmmm, it's already in the list? It seems the "Fo" just isn't being > passed as the partial match. What am I missing? > > > > >> Should I attempt to load all of the in-buffer classes in the case your >> describing? >> > > Seems reasonable to me...as a user. ;-) > Can do. Not sure why its showing up on your end. I'll make sure I'm running the current cvs and try again on my side. Was the text in the email the only stuff in the buffer? --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From gsinclair at gmail.com Thu Apr 20 04:44:25 2006 From: gsinclair at gmail.com (Gavin Sinclair) Date: Thu, 20 Apr 2006 18:44:25 +1000 Subject: preliminary rubycomplete documentation for review In-Reply-To: <44472EE5.5030002@hasno.info> References: <4446A31E.203@hasno.info> <44472EE5.5030002@hasno.info> Message-ID: On 4/20/06, Mark Guzman wrote: > Gavin, > : will complete symbols. If done with no preceding text it will provide > a list of global symbols. [...] > > 3. After '.' or '::' Methods applicable to the object being > dereferenced 4. After ':' or ':foo' Symbol name (beginning with 'foo') How does that sound? Completing symbols is completely different to completing methods, so it's confusing to read them lumped together. Completing symbols seems like a pointless feature. When I want to complete a symbol, Vim's normal text completion (CTRL-P in insert mode) does the job just fine. I hate to think of the processing involved in getting all the symbol names and narrowing it :) Not that I've tried it, though. Gavin From dougkearns at gmail.com Thu Apr 20 05:04:08 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Thu, 20 Apr 2006 19:04:08 +1000 Subject: current version In-Reply-To: <44473B05.6010004@hasno.info> References: <44472D70.7000200@hasno.info> <20060420070651.GG8671@localhost.localdomain> <44473516.2020804@hasno.info> <20060420073153.GA10878@localhost.localdomain> <44473B05.6010004@hasno.info> Message-ID: <20060420090408.GA10974@localhost.localdomain> On Thu, Apr 20, 2006 at 03:40:53AM -0400, Mark Guzman wrote: > Doug Kearns wrote: > > > > Hmmm, it's already in the list? It seems the "Fo" just isn't being > > passed as the partial match. What am I missing? > > > > > > > > > >> Should I attempt to load all of the in-buffer classes in the case your > >> describing? > >> > > > > Seems reasonable to me...as a user. ;-) > > > Can do. Not sure why its showing up on your end. I'll make sure I'm > running the current cvs and try again on my side. > Was the text in the email the only stuff in the buffer? Sorry, it seems I might have accidentally 'loaded' it in a previous buffer. One other thing I just noticed is that: :| is being completed to ::global_symbol Thanks, Doug From dougkearns at gmail.com Thu Apr 20 05:21:43 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Thu, 20 Apr 2006 19:21:43 +1000 Subject: Include FAQ in release Message-ID: <20060420092143.GB10974@localhost.localdomain> Gavin, Is there any reason not to include the FAQ in this release? Thanks, Doug From dougkearns at gmail.com Thu Apr 20 06:21:02 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Thu, 20 Apr 2006 20:21:02 +1000 Subject: preliminary rubycomplete documentation for review In-Reply-To: References: <4446A31E.203@hasno.info> <44472EE5.5030002@hasno.info> Message-ID: <20060420102102.GC10974@localhost.localdomain> On Thu, Apr 20, 2006 at 06:44:25PM +1000, Gavin Sinclair wrote: > On 4/20/06, Mark Guzman wrote: > > > Gavin, > > : will complete symbols. If done with no preceding text it will provide > > a list of global symbols. > > [...] > > > > > 3. After '.' or '::' Methods applicable to the object being > > dereferenced > > 4. After ':' or ':foo' Symbol name (beginning with 'foo') > > How does that sound? Completing symbols is completely different to > completing methods, so it's confusing to read them lumped together. Sounds good to me. I've added it to doc/ft-ruby-omni.txt > Completing symbols seems like a pointless feature. When I want to > complete a symbol, Vim's normal text completion (CTRL-P in insert > mode) does the job just fine. I hate to think of the processing > involved in getting all the symbol names and narrowing it :) Not that > I've tried it, though. Am I right in assuming this will be useful for rails users, in particular? Regards, Doug From dougkearns at gmail.com Thu Apr 20 06:29:28 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Thu, 20 Apr 2006 20:29:28 +1000 Subject: Please remember to send updated files to Bram by tomorrow In-Reply-To: References: Message-ID: <20060420102928.GD10974@localhost.localdomain> On Wed, Apr 19, 2006 at 08:41:20PM +0200, Nikolai Weibull wrote: > The deadline has been set for tomorrow, so please remember to send out > any updated files to Bram as soon as possible. Done. > We don't want another 6.3 mishap. I can see you in your nursing home bed at 90 awaking, startled, in the early hours of the morning, from yet another nightmare. :) > That is all. No problem - glad for the reminder. Thanks, Doug From dougkearns at gmail.com Thu Apr 20 08:59:05 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Thu, 20 Apr 2006 22:59:05 +1000 Subject: Omni - Ruby version dependency In-Reply-To: <20060420092143.GB10974@localhost.localdomain> References: <20060420092143.GB10974@localhost.localdomain> Message-ID: <20060420125905.GF10974@localhost.localdomain> Mark, Are there any strange Ruby version requirements to run the omni completion script? Is any 1.8.x OK? Thanks, Doug From gsinclair at gmail.com Thu Apr 20 09:16:55 2006 From: gsinclair at gmail.com (Gavin Sinclair) Date: Thu, 20 Apr 2006 23:16:55 +1000 Subject: Include FAQ in release In-Reply-To: <20060420092143.GB10974@localhost.localdomain> References: <20060420092143.GB10974@localhost.localdomain> Message-ID: On 4/20/06, Doug Kearns wrote: > Gavin, > > Is there any reason not to include the FAQ in this release? > It's not in "published" form and it's not complete (doesn't talk about omni completion, for instance). It's a good idea to include it in the release, though, with a clear caveat to the user that it's raw information, not polished. For example, it has "*** TOC ***" or something, and all the headings have a prefix of -X. It's intended to process this information to generate heading numbers and a table of contents. Gavin From gsinclair at gmail.com Thu Apr 20 09:19:25 2006 From: gsinclair at gmail.com (Gavin Sinclair) Date: Thu, 20 Apr 2006 23:19:25 +1000 Subject: preliminary rubycomplete documentation for review In-Reply-To: <20060420102102.GC10974@localhost.localdomain> References: <4446A31E.203@hasno.info> <44472EE5.5030002@hasno.info> <20060420102102.GC10974@localhost.localdomain> Message-ID: On 4/20/06, Doug Kearns wrote: > > 4. After ':' or ':foo' Symbol name (beginning with 'foo') > > > > How does that sound? Completing symbols is completely different to > > completing methods, so it's confusing to read them lumped together. > > Sounds good to me. I've added it to doc/ft-ruby-omni.txt So this is user documentation, not to be inserted into insert.txt like Mark distributed to us? It's the user's responsibility to generate it after installation? > > Completing symbols seems like a pointless feature. When I want to > > complete a symbol, Vim's normal text completion (CTRL-P in insert > > mode) does the job just fine. I hate to think of the processing > > involved in getting all the symbol names and narrowing it :) Not that > > I've tried it, though. > > Am I right in assuming this will be useful for rails users, in > particular? Rails uses a lot of symbols, to be sure, but once you've typed it once anywhere in any buffer, symbol completion is only a CTRL-P away :) Gavin From segfault at hasno.info Thu Apr 20 09:36:59 2006 From: segfault at hasno.info (Mark Guzman) Date: Thu, 20 Apr 2006 09:36:59 -0400 Subject: Omni - Ruby version dependency In-Reply-To: <20060420125905.GF10974@localhost.localdomain> References: <20060420092143.GB10974@localhost.localdomain> <20060420125905.GF10974@localhost.localdomain> Message-ID: <44478E7B.2030707@hasno.info> Doug Kearns wrote: > Are there any strange Ruby version requirements to run the omni > completion script? Is any 1.8.x OK? > > Doug, I'm gona say yes to that, as I've not tried it with anything but 1.8.x --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From segfault at hasno.info Thu Apr 20 09:40:45 2006 From: segfault at hasno.info (Mark Guzman) Date: Thu, 20 Apr 2006 09:40:45 -0400 Subject: preliminary rubycomplete documentation for review In-Reply-To: References: <4446A31E.203@hasno.info> <44472EE5.5030002@hasno.info> <20060420102102.GC10974@localhost.localdomain> Message-ID: <44478F5D.60706@hasno.info> Gavin Sinclair wrote: > On 4/20/06, Doug Kearns wrote: > >>> 4. After ':' or ':foo' Symbol name (beginning with 'foo') >>> >>> How does that sound? Completing symbols is completely different to >>> completing methods, so it's confusing to read them lumped together. >>> >> Sounds good to me. I've added it to doc/ft-ruby-omni.txt >> > > So this is user documentation, not to be inserted into insert.txt like > Mark distributed to us? It's the user's responsibility to generate it > after installation? > > No clue on my part, I assumed it should follow suite with ft-c-omni et. al. > > Rails uses a lot of symbols, to be sure, but once you've typed it once > anywhere in any buffer, symbol completion is only a CTRL-P away :) > > Irb/complete provided the symbol list, we can always pull it out. Though it is nice to have some of the rails symbols handy. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From dougkearns at gmail.com Thu Apr 20 10:42:26 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Fri, 21 Apr 2006 00:42:26 +1000 Subject: preliminary rubycomplete documentation for review In-Reply-To: References: <4446A31E.203@hasno.info> <44472EE5.5030002@hasno.info> <20060420102102.GC10974@localhost.localdomain> Message-ID: <20060420144226.GG10974@localhost.localdomain> On Thu, Apr 20, 2006 at 11:19:25PM +1000, Gavin Sinclair wrote: > On 4/20/06, Doug Kearns wrote: > > > 4. After ':' or ':foo' Symbol name (beginning with 'foo') > > > > > > How does that sound? Completing symbols is completely different to > > > completing methods, so it's confusing to read them lumped together. > > > > Sounds good to me. I've added it to doc/ft-ruby-omni.txt > > So this is user documentation, not to be inserted into insert.txt like > Mark distributed to us? It's the user's responsibility to generate it > after installation? Well it's possibly both now. I used to have the syntax documentation in syntax/doc/ruby.txt but since we're also adding some for omni completion I thought it might be a good idea to make them more obviously accessible to the user. I've sent the contents of ft-ruby-omni.txt to Bram and he's already added it to insert.txt. If you think it's confusing there's no need to package up the doc directory for release. It just seems like a good idea to have it in the repository too - for when we're all long gone...bus or no bus. ;-) > > > Completing symbols seems like a pointless feature. When I want to > > > complete a symbol, Vim's normal text completion (CTRL-P in insert > > > mode) does the job just fine. I hate to think of the processing > > > involved in getting all the symbol names and narrowing it :) Not that > > > I've tried it, though. > > > > Am I right in assuming this will be useful for rails users, in > > particular? > > Rails uses a lot of symbols, to be sure, but once you've typed it once > anywhere in any buffer, symbol completion is only a CTRL-P away :) Sure but how many times are you going to call something like url_for in a simple controller and with the same 'options'? I assume, from what Mark was saying, he has some way to provide the appropriate symbols. Note: I've only ever looked at Rails once and this was the first method I could find in my old rails 'sandbox'. ;-) Regards, Doug From dougkearns at gmail.com Thu Apr 20 10:52:29 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Fri, 21 Apr 2006 00:52:29 +1000 Subject: preliminary rubycomplete documentation for review In-Reply-To: <20060420144226.GG10974@localhost.localdomain> References: <4446A31E.203@hasno.info> <44472EE5.5030002@hasno.info> <20060420102102.GC10974@localhost.localdomain> <20060420144226.GG10974@localhost.localdomain> Message-ID: <20060420145229.GA25912@localhost.localdomain> On Fri, Apr 21, 2006 at 12:42:26AM +1000, Doug Kearns wrote: > On Thu, Apr 20, 2006 at 11:19:25PM +1000, Gavin Sinclair wrote: > > On 4/20/06, Doug Kearns wrote: > > > > 4. After ':' or ':foo' Symbol name (beginning with 'foo') > > > > > > > > How does that sound? Completing symbols is completely different to > > > > completing methods, so it's confusing to read them lumped together. > > > > > > Sounds good to me. I've added it to doc/ft-ruby-omni.txt > > > > So this is user documentation, not to be inserted into insert.txt like > > Mark distributed to us? It's the user's responsibility to generate it > > after installation? > > Well it's possibly both now. I used to have the syntax documentation in > syntax/doc/ruby.txt but since we're also adding some for omni completion > I thought it might be a good idea to make them more obviously accessible > to the user. I've sent the contents of ft-ruby-omni.txt to Bram and he's > already added it to insert.txt. If it was distributed I hadn't actually considered _installing_ it locally. I doubt it'd change enough to make that worthwhile although Mark seems to have some plans for the omni completion so maybe it would be? Regards, Doug From gsinclair at gmail.com Thu Apr 20 18:35:34 2006 From: gsinclair at gmail.com (Gavin Sinclair) Date: Fri, 21 Apr 2006 08:35:34 +1000 Subject: preliminary rubycomplete documentation for review In-Reply-To: <20060420145229.GA25912@localhost.localdomain> References: <4446A31E.203@hasno.info> <44472EE5.5030002@hasno.info> <20060420102102.GC10974@localhost.localdomain> <20060420144226.GG10974@localhost.localdomain> <20060420145229.GA25912@localhost.localdomain> Message-ID: On 4/21/06, Doug Kearns wrote: > > > > > > So this is user documentation, not to be inserted into insert.txt like > > > Mark distributed to us? It's the user's responsibility to generate it > > > after installation? > > > > Well it's possibly both now. I used to have the syntax documentation in > > syntax/doc/ruby.txt but since we're also adding some for omni completion > > I thought it might be a good idea to make them more obviously accessible > > to the user. I've sent the contents of ft-ruby-omni.txt to Bram and he's > > already added it to insert.txt. > > If it was distributed I hadn't actually considered _installing_ it > locally. I doubt it'd change enough to make that worthwhile although > Mark seems to have some plans for the omni completion so maybe it would > be? 'Fraid I don't have a quick or a good answer to that one. There are obvious advantages in having the docs embedded in Vim's docs. Perhaps if the ft-ruby-omni docs included a link to the website people would know where to look for updates and updated information. Also, if it's embedded, people should know that compiling with +ruby is a necessary but not sufficient condition for omni completion: it must be enabled in the .vimrc or (better) an ftplugin file. Another reason to link to vim-ruby.rubyforge.org. I must confess I hadn't realised that the Ruby *syntax* docs were embedded. Since they are, let's ensure the omni ones are too. And what about a website link in the syntax docs, Doug? Cheers, Gavin From gsinclair at gmail.com Thu Apr 20 18:39:29 2006 From: gsinclair at gmail.com (Gavin Sinclair) Date: Fri, 21 Apr 2006 08:39:29 +1000 Subject: preliminary rubycomplete documentation for review In-Reply-To: <20060420144226.GG10974@localhost.localdomain> References: <4446A31E.203@hasno.info> <44472EE5.5030002@hasno.info> <20060420102102.GC10974@localhost.localdomain> <20060420144226.GG10974@localhost.localdomain> Message-ID: On 4/21/06, Doug Kearns wrote: > > > > So this is user documentation, not to be inserted into insert.txt like > > Mark distributed to us? It's the user's responsibility to generate it > > after installation? > > Well it's possibly both now. I used to have the syntax documentation in > syntax/doc/ruby.txt but since we're also adding some for omni completion > I thought it might be a good idea to make them more obviously accessible > to the user. I've sent the contents of ft-ruby-omni.txt to Bram and he's > already added it to insert.txt. As per my ranting in the other email: I agree, the accessability is a good thing, outweighing other concerns. Is it too late to get a website link in there? > If you think it's confusing there's no need to package up the doc > directory for release. It just seems like a good idea to have it in the > repository too - for when we're all long gone...bus or no bus. ;-) Agree to that too. The FAQ or something should explain the situation. > > Rails uses a lot of symbols, to be sure, but once you've typed it once > > anywhere in any buffer, symbol completion is only a CTRL-P away :) > > Sure but how many times are you going to call something like url_for in > a simple controller and with the same 'options'? Lots of times :) Gavin From gsinclair at gmail.com Thu Apr 20 18:41:25 2006 From: gsinclair at gmail.com (Gavin Sinclair) Date: Fri, 21 Apr 2006 08:41:25 +1000 Subject: preliminary rubycomplete documentation for review In-Reply-To: <44478F5D.60706@hasno.info> References: <4446A31E.203@hasno.info> <44472EE5.5030002@hasno.info> <20060420102102.GC10974@localhost.localdomain> <44478F5D.60706@hasno.info> Message-ID: On 4/20/06, Mark Guzman wrote: > > > > Rails uses a lot of symbols, to be sure, but once you've typed it once > > anywhere in any buffer, symbol completion is only a CTRL-P away :) > > Irb/complete provided the symbol list, we can always pull it out. Though > it is nice to have some of the rails symbols handy. Unlike on other subjects, Mark, my rantings on this subject are not to be taken seriously :) No need to pull it out. Cheers, Gavin From segfault at hasno.info Thu Apr 20 20:34:08 2006 From: segfault at hasno.info (Mark Guzman) Date: Thu, 20 Apr 2006 20:34:08 -0400 Subject: preliminary rubycomplete documentation for review In-Reply-To: References: <4446A31E.203@hasno.info> <44472EE5.5030002@hasno.info> <20060420102102.GC10974@localhost.localdomain> <44478F5D.60706@hasno.info> Message-ID: <44482880.7000004@hasno.info> Gavin Sinclair wrote: > On 4/20/06, Mark Guzman wrote: > >>> Rails uses a lot of symbols, to be sure, but once you've typed it once >>> anywhere in any buffer, symbol completion is only a CTRL-P away :) >>> >> Irb/complete provided the symbol list, we can always pull it out. Though >> it is nice to have some of the rails symbols handy. >> > > Unlike on other subjects, Mark, my rantings on this subject are not to > be taken seriously :) No need to pull it out. > > Cheers, > Gavin > > No worries man, its all good. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From segfault at hasno.info Fri Apr 21 00:34:48 2006 From: segfault at hasno.info (Mark Guzman) Date: Fri, 21 Apr 2006 00:34:48 -0400 Subject: current version In-Reply-To: <44473B05.6010004@hasno.info> References: <44472D70.7000200@hasno.info> <20060420070651.GG8671@localhost.localdomain> <44473516.2020804@hasno.info> <20060420073153.GA10878@localhost.localdomain> <44473B05.6010004@hasno.info> Message-ID: <444860E8.9070801@hasno.info> Mark Guzman wrote: > Doug Kearns wrote: > >> Hmmm, it's already in the list? It seems the "Fo" just isn't being >> passed as the partial match. What am I missing? >> >> >> >> >> >>> Should I attempt to load all of the in-buffer classes in the case your >>> describing? >>> >>> >> Seems reasonable to me...as a user. ;-) >> Doug, I've added support for adding classes defined in the buffer to the constants completion menu. It's checked into cvs, you just need to add let g:rubycomplete_load_on_global = 1 to your vimrc... --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From dougkearns at gmail.com Fri Apr 21 02:52:52 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Fri, 21 Apr 2006 16:52:52 +1000 Subject: current version In-Reply-To: <444860E8.9070801@hasno.info> References: <44472D70.7000200@hasno.info> <20060420070651.GG8671@localhost.localdomain> <44473516.2020804@hasno.info> <20060420073153.GA10878@localhost.localdomain> <44473B05.6010004@hasno.info> <444860E8.9070801@hasno.info> Message-ID: <20060421065252.GB25912@localhost.localdomain> On Fri, Apr 21, 2006 at 12:34:48AM -0400, Mark Guzman wrote: > Mark Guzman wrote: > > Doug Kearns wrote: > > > >> Hmmm, it's already in the list? It seems the "Fo" just isn't being > >> passed as the partial match. What am I missing? > >> > >> > >> > >> > >> > >>> Should I attempt to load all of the in-buffer classes in the case your > >>> describing? > >>> > >>> > >> Seems reasonable to me...as a user. ;-) > >> > Doug, > I've added support for adding classes defined in the buffer to the > constants completion menu. It's checked into cvs, you just need to add > let g:rubycomplete_load_on_global = 1 > to your vimrc... Thanks! Have you got a description for the help doco? ;-) Regards, Doug From gsinclair at gmail.com Fri Apr 21 02:56:04 2006 From: gsinclair at gmail.com (Gavin Sinclair) Date: Fri, 21 Apr 2006 16:56:04 +1000 Subject: current version In-Reply-To: <20060421065252.GB25912@localhost.localdomain> References: <44472D70.7000200@hasno.info> <20060420070651.GG8671@localhost.localdomain> <44473516.2020804@hasno.info> <20060420073153.GA10878@localhost.localdomain> <44473B05.6010004@hasno.info> <444860E8.9070801@hasno.info> <20060421065252.GB25912@localhost.localdomain> Message-ID: On 4/21/06, Doug Kearns wrote: > > I've added support for adding classes defined in the buffer to the > > constants completion menu. It's checked into cvs, you just need to add > > let g:rubycomplete_load_on_global = 1 > > to your vimrc... > > Thanks! Have you got a description for the help doco? ;-) Aren't there other variables that should be documented as well? My memory is patchy... Gavin From dougkearns at gmail.com Fri Apr 21 03:03:07 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Fri, 21 Apr 2006 17:03:07 +1000 Subject: current version In-Reply-To: References: <44472D70.7000200@hasno.info> <20060420070651.GG8671@localhost.localdomain> <44473516.2020804@hasno.info> <20060420073153.GA10878@localhost.localdomain> <44473B05.6010004@hasno.info> <444860E8.9070801@hasno.info> <20060421065252.GB25912@localhost.localdomain> Message-ID: <20060421070307.GC25912@localhost.localdomain> On Fri, Apr 21, 2006 at 04:56:04PM +1000, Gavin Sinclair wrote: > On 4/21/06, Doug Kearns wrote: > > > I've added support for adding classes defined in the buffer to the > > > constants completion menu. It's checked into cvs, you just need to add > > > let g:rubycomplete_load_on_global = 1 > > > to your vimrc... > > > > Thanks! Have you got a description for the help doco? ;-) > > Aren't there other variables that should be documented as well? My > memory is patchy... Only g:rubycomplete_rails which already has a description. Regards, Doug From dougkearns at gmail.com Fri Apr 21 03:24:09 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Fri, 21 Apr 2006 17:24:09 +1000 Subject: current version In-Reply-To: <444860E8.9070801@hasno.info> References: <44472D70.7000200@hasno.info> <20060420070651.GG8671@localhost.localdomain> <44473516.2020804@hasno.info> <20060420073153.GA10878@localhost.localdomain> <44473B05.6010004@hasno.info> <444860E8.9070801@hasno.info> Message-ID: <20060421072409.GD25912@localhost.localdomain> On Fri, Apr 21, 2006 at 12:34:48AM -0400, Mark Guzman wrote: > I've added support for adding classes defined in the buffer to the > constants completion menu. It's checked into cvs, you just need to add > let g:rubycomplete_load_on_global = 1 > to your vimrc... FWIW, this var name is a little confusing to me since you're not, unless I'm misreading, actually 'loading' the class(es) in this case. I'm also getting: Error detected while processing function rubycomplete#Complete: line 22: TypeError: (eval):321:in `+': can't convert nil into Array if I don't have the var set. Regards, Doug From dougkearns at gmail.com Fri Apr 21 03:42:05 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Fri, 21 Apr 2006 17:42:05 +1000 Subject: preliminary rubycomplete documentation for review In-Reply-To: References: <4446A31E.203@hasno.info> <44472EE5.5030002@hasno.info> <20060420102102.GC10974@localhost.localdomain> <20060420144226.GG10974@localhost.localdomain> <20060420145229.GA25912@localhost.localdomain> Message-ID: <20060421074205.GE25912@localhost.localdomain> On Fri, Apr 21, 2006 at 08:35:34AM +1000, Gavin Sinclair wrote: > Perhaps if the ft-ruby-omni docs included a link to the website people > would know where to look for updates and updated information. Well they should know to look in the runtime file header. That's why it's there - same as any other runtime file. > Also, if it's embedded, people should know that compiling with +ruby > is a necessary but not sufficient condition for omni completion: it > must be enabled in the .vimrc or (better) an ftplugin file. Another > reason to link to vim-ruby.rubyforge.org. This is no different from all the other omni scripts - they all have the same requirements which are documented in the Vim help. > I must confess I hadn't realised that the Ruby *syntax* docs were > embedded. Since they are, let's ensure the omni ones are too. Hmmm, must be because the defaults are so spectacularly good. > And what about a website link in the syntax docs, Doug? Well if we're going to go down this path perhaps we could also consider creating a file like: :help sql.txt Regards, Doug From gsinclair at gmail.com Fri Apr 21 03:51:28 2006 From: gsinclair at gmail.com (Gavin Sinclair) Date: Fri, 21 Apr 2006 17:51:28 +1000 Subject: preliminary rubycomplete documentation for review In-Reply-To: <20060421074205.GE25912@localhost.localdomain> References: <4446A31E.203@hasno.info> <44472EE5.5030002@hasno.info> <20060420102102.GC10974@localhost.localdomain> <20060420144226.GG10974@localhost.localdomain> <20060420145229.GA25912@localhost.localdomain> <20060421074205.GE25912@localhost.localdomain> Message-ID: On 4/21/06, Doug Kearns wrote: > On Fri, Apr 21, 2006 at 08:35:34AM +1000, Gavin Sinclair wrote: > > > Perhaps if the ft-ruby-omni docs included a link to the website people > > would know where to look for updates and updated information. > > Well they should know to look in the runtime file header. That's why > it's there - same as any other runtime file. Oh yeah... Except some people might not know that there *is* a runtime file header, especially as they're reading docs that just came with Vim. > > Also, if it's embedded, people should know that compiling with +ruby > > is a necessary but not sufficient condition for omni completion: it > > must be enabled in the .vimrc or (better) an ftplugin file. Another > > reason to link to vim-ruby.rubyforge.org. > > This is no different from all the other omni scripts - they all have the > same requirements which are documented in the Vim help. True. > > I must confess I hadn't realised that the Ruby *syntax* docs were > > embedded. Since they are, let's ensure the omni ones are too. > > Hmmm, must be because the defaults are so spectacularly good. I've never considered looking into my options :) > > And what about a website link in the syntax docs, Doug? > > Well if we're going to go down this path perhaps we could also consider > creating a file like: > > :help sql.txt Huh?? Gavin From dougkearns at gmail.com Fri Apr 21 03:58:19 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Fri, 21 Apr 2006 17:58:19 +1000 Subject: preliminary rubycomplete documentation for review In-Reply-To: References: <44472EE5.5030002@hasno.info> <20060420102102.GC10974@localhost.localdomain> <20060420144226.GG10974@localhost.localdomain> <20060420145229.GA25912@localhost.localdomain> <20060421074205.GE25912@localhost.localdomain> Message-ID: <20060421075819.GF25912@localhost.localdomain> On Fri, Apr 21, 2006 at 05:51:28PM +1000, Gavin Sinclair wrote: > On 4/21/06, Doug Kearns wrote: > > Well they should know to look in the runtime file header. That's why > > it's there - same as any other runtime file. > > Oh yeah... > > Except some people might not know that there *is* a runtime file > header, especially as they're reading docs that just came with Vim. I thought the Vim docs mentioned that you should always check the header? > > > And what about a website link in the syntax docs, Doug? > > > > Well if we're going to go down this path perhaps we could also consider > > creating a file like: > > > > :help sql.txt > > Huh?? Type it in Vim 7. ;-) Regards, Doug From dougkearns at gmail.com Fri Apr 21 05:30:53 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Fri, 21 Apr 2006 19:30:53 +1000 Subject: current version In-Reply-To: <20060421072409.GD25912@localhost.localdomain> References: <44472D70.7000200@hasno.info> <20060420070651.GG8671@localhost.localdomain> <44473516.2020804@hasno.info> <20060420073153.GA10878@localhost.localdomain> <44473B05.6010004@hasno.info> <444860E8.9070801@hasno.info> <20060421072409.GD25912@localhost.localdomain> Message-ID: <20060421093053.GG25912@localhost.localdomain> On Fri, Apr 21, 2006 at 05:24:09PM +1000, Doug Kearns wrote: > On Fri, Apr 21, 2006 at 12:34:48AM -0400, Mark Guzman wrote: > > > > > I've added support for adding classes defined in the buffer to the > > constants completion menu. It's checked into cvs, you just need to add > > let g:rubycomplete_load_on_global = 1 > > to your vimrc... > > FWIW, this var name is a little confusing to me since you're not, unless > I'm misreading, actually 'loading' the class(es) in this case. > > I'm also getting: > > Error detected while processing function rubycomplete#Complete: > line 22: > TypeError: (eval):321:in `+': can't convert nil into Array > > if I don't have the var set. Something like this should fix it. Regards, Doug Index: autoload/rubycomplete.vim =================================================================== RCS file: /var/cvs/vim-ruby/vim-ruby/autoload/rubycomplete.vim,v retrieving revision 1.10 diff -u -r1.10 rubycomplete.vim --- autoload/rubycomplete.vim 21 Apr 2006 04:30:18 -0000 1.10 +++ autoload/rubycomplete.vim 21 Apr 2006 09:30:52 -0000 @@ -231,7 +231,7 @@ def get_buffer_classes() # this will be a little expensive. allow_aggressive_load = VIM::evaluate('g:rubycomplete_load_on_global') - return if allow_aggressive_load != '1' + return [] if allow_aggressive_load != '1' buf = VIM::Buffer.current eob = buf.length From gsinclair at gmail.com Fri Apr 21 06:17:13 2006 From: gsinclair at gmail.com (Gavin Sinclair) Date: Fri, 21 Apr 2006 20:17:13 +1000 Subject: preliminary rubycomplete documentation for review In-Reply-To: <20060421075819.GF25912@localhost.localdomain> References: <20060420102102.GC10974@localhost.localdomain> <20060420144226.GG10974@localhost.localdomain> <20060420145229.GA25912@localhost.localdomain> <20060421074205.GE25912@localhost.localdomain> <20060421075819.GF25912@localhost.localdomain> Message-ID: On 4/21/06, Doug Kearns wrote: > > > > Except some people might not know that there *is* a runtime file > > header, especially as they're reading docs that just came with Vim. > > I thought the Vim docs mentioned that you should always check the > header? News to me... I'm such an old-timer now I don't know what the correct assumptions are :) > > > Well if we're going to go down this path perhaps we could also consider > > > creating a file like: > > > > > > :help sql.txt > > > > Huh?? > > Type it in Vim 7. ;-) Oh, but I don't have Vim 7!... Gavin From dougkearns at gmail.com Fri Apr 21 09:54:20 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Fri, 21 Apr 2006 23:54:20 +1000 Subject: current version In-Reply-To: <44473096.5020004@hasno.info> References: <44472D70.7000200@hasno.info> <20060420065157.GF8671@localhost.localdomain> <44473096.5020004@hasno.info> Message-ID: <20060421135420.GA3754@localhost.localdomain> On Thu, Apr 20, 2006 at 02:56:22AM -0400, Mark Guzman wrote: > Doug Kearns wrote: > > On Thu, Apr 20, 2006 at 02:42:56AM -0400, Mark Guzman wrote: > > > > > > > >> When is the next release of vim-ruby? > >> > > > > When you're ready. If you like I can make a release in the next 6 hours > > or so... > I'm game for a release, anything else I can do? I assumed you didn't want this done while you're still working on immediate issues? Regards, Doug From segfault at hasno.info Fri Apr 21 11:14:06 2006 From: segfault at hasno.info (Mark Guzman) Date: Fri, 21 Apr 2006 11:14:06 -0400 Subject: current version In-Reply-To: <20060421135420.GA3754@localhost.localdomain> References: <44472D70.7000200@hasno.info> <20060420065157.GF8671@localhost.localdomain> <44473096.5020004@hasno.info> <20060421135420.GA3754@localhost.localdomain> Message-ID: <4448F6BE.3090309@hasno.info> Doug Kearns wrote: > I assumed you didn't want this done while you're still working on > immediate issues? > Doug, Yup, I've checked in a fix for the bug Gavin found and I've changed the name of the variable controlling it. In addition I've updated the documentation and changelog. Testing time. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From wjrogers at terpalum.umd.edu Fri Apr 21 12:05:58 2006 From: wjrogers at terpalum.umd.edu (Will Rogers) Date: Fri, 21 Apr 2006 12:05:58 -0400 Subject: comment indentation Message-ID: <323a37200604210905r22192f24o2793315aaa7dc640@mail.gmail.com> Hi, I use your vim-ruby scripts to make writing Rails code a little more pleasant. One thing drives me batty, though, and I want to find out if it's some sort of glitch or a genuine bug in the ruby indentation file. Simply put, whenever I go to start a line with a comment, the line jumps all the way to the left as soon as I type the '#'. If I then exit insert mode and do a == or other command that re-indents the line in question, it returns to its proper indentation level. What's going on here? It's terribly annoying. Thanks for your time, -- Will Rogers wjrogers at terpalum.umd.edu From now at bitwi.se Fri Apr 21 12:24:28 2006 From: now at bitwi.se (Nikolai Weibull) Date: Fri, 21 Apr 2006 18:24:28 +0200 Subject: comment indentation In-Reply-To: <323a37200604210905r22192f24o2793315aaa7dc640@mail.gmail.com> References: <323a37200604210905r22192f24o2793315aaa7dc640@mail.gmail.com> Message-ID: On 4/21/06, Will Rogers wrote: > Simply put, whenever I go to start a line with a comment, the line > jumps all the way to the left as soon as I type the '#'. If I then > exit insert mode and do a == or other command that re-indents the line > in question, it returns to its proper indentation level. What's going > on here? It's terribly annoying. It sounds like you don't have the right indentation file installed. In our indent/ruby.vim we set the 'indentkeys' option to a value that suits Ruby. It does not include '#' as it only makes sense for C and a few other languages. However, it is in the 'indentkeys' option by default, so it seems that your setup isn't quite right. Please read the installation documentation. If you're still unable to get this to work correctly, I'm going to leave this to Doug and/or Gavin. nikolai (who, without resentment, wonders how hard it can actually be) From wjrogers at terpalum.umd.edu Fri Apr 21 12:40:45 2006 From: wjrogers at terpalum.umd.edu (Will Rogers) Date: Fri, 21 Apr 2006 12:40:45 -0400 Subject: comment indentation In-Reply-To: References: <323a37200604210905r22192f24o2793315aaa7dc640@mail.gmail.com> Message-ID: <323a37200604210940y60b295c6m81f18694930502b6@mail.gmail.com> On 4/21/06, Nikolai Weibull wrote: > On 4/21/06, Will Rogers wrote: > > Simply put, whenever I go to start a line with a comment, the line > > jumps all the way to the left as soon as I type the '#'. > > It sounds like you don't have the right indentation file installed. I did have the right files installed, and I did read the documentation :P Thanks to your feedback though, I knew to look to my configuration for the problem. Some experimentation traced it to smartindent. Got rid of that and everything is grand. Thanks for the help. -- Will Rogers wjrogers at terpalum.umd.edu From now at bitwi.se Fri Apr 21 16:15:40 2006 From: now at bitwi.se (Nikolai Weibull) Date: Fri, 21 Apr 2006 22:15:40 +0200 Subject: comment indentation In-Reply-To: <323a37200604210940y60b295c6m81f18694930502b6@mail.gmail.com> References: <323a37200604210905r22192f24o2793315aaa7dc640@mail.gmail.com> <323a37200604210940y60b295c6m81f18694930502b6@mail.gmail.com> Message-ID: On 4/21/06, Will Rogers wrote: > On 4/21/06, Nikolai Weibull wrote: > > On 4/21/06, Will Rogers wrote: > > > Simply put, whenever I go to start a line with a comment, the line > > > jumps all the way to the left as soon as I type the '#'. > > > > It sounds like you don't have the right indentation file installed. > > I did have the right files installed, and I did read the documentation > :P Thanks to your feedback though, I knew to look to my configuration > for the problem. Some experimentation traced it to smartindent. Got > rid of that and everything is grand. Ah! We used to disable 'smartindent' in indent/ruby.vim, but that's really not the place to do so so it was removed. The thing about 'smartindent' is that it should only be set in an indent script explicitly, not in a users vimrc or similar. 'Smartindent' stems from a time before indent scripts and is quite useless under most circumstances today. Perhaps we should add a comment about 'smartindent' in some sort of FAQ or perhaps to the installation documentation. Will: thanks for giving us an explanation as to what the cause was. nikolai From gsinclair at gmail.com Fri Apr 21 21:33:25 2006 From: gsinclair at gmail.com (Gavin Sinclair) Date: Sat, 22 Apr 2006 11:33:25 +1000 Subject: comment indentation In-Reply-To: References: <323a37200604210905r22192f24o2793315aaa7dc640@mail.gmail.com> <323a37200604210940y60b295c6m81f18694930502b6@mail.gmail.com> Message-ID: On 4/22/06, Nikolai Weibull wrote: > We used to disable 'smartindent' in indent/ruby.vim, but that's really > not the place to do so so it was removed. The thing about > 'smartindent' is that it should only be set in an indent script > explicitly, not in a users vimrc or similar. 'Smartindent' stems from > a time before indent scripts and is quite useless under most > circumstances today. Should indent/ruby.vim *disable* smartindent? > Perhaps we should add a comment about 'smartindent' in some sort of > FAQ or perhaps to the installation documentation. The FAQ/doc could say that smartindent is disabled in indent/ruby.vim and the user should use their .vimrc or whatever to reenable it if they really want to. > Will: thanks for giving us an explanation as to what the cause was. +1 Gavin From dougkearns at gmail.com Mon Apr 24 18:48:11 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Tue, 25 Apr 2006 08:48:11 +1000 Subject: current version In-Reply-To: <4448F6BE.3090309@hasno.info> References: <44472D70.7000200@hasno.info> <20060420065157.GF8671@localhost.localdomain> <44473096.5020004@hasno.info> <20060421135420.GA3754@localhost.localdomain> <4448F6BE.3090309@hasno.info> Message-ID: <20060424224811.GA3970@localhost.localdomain> On Fri, Apr 21, 2006 at 11:14:06AM -0400, Mark Guzman wrote: > Doug Kearns wrote: > > > I assumed you didn't want this done while you're still working on > > immediate issues? > > > Doug, > Yup, I've checked in a fix for the bug Gavin found and I've changed > the name of the variable controlling it. In addition I've updated the > documentation and changelog. Testing time. Let me know when you're ready to go. Regards, Doug From segfault at hasno.info Mon Apr 24 09:56:15 2006 From: segfault at hasno.info (Mark Guzman) Date: Mon, 24 Apr 2006 09:56:15 -0400 Subject: current version In-Reply-To: <20060424224811.GA3970@localhost.localdomain> References: <44472D70.7000200@hasno.info> <20060420065157.GF8671@localhost.localdomain> <44473096.5020004@hasno.info> <20060421135420.GA3754@localhost.localdomain> <4448F6BE.3090309@hasno.info> <20060424224811.GA3970@localhost.localdomain> Message-ID: <444CD8FF.9040509@hasno.info> Doug Kearns wrote: > > Let me know when you're ready to go. > > Doug, I'm all set at this point, I'm looking for bugs. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From dougkearns at gmail.com Mon Apr 24 20:40:58 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Tue, 25 Apr 2006 10:40:58 +1000 Subject: current version In-Reply-To: <444CD8FF.9040509@hasno.info> References: <44472D70.7000200@hasno.info> <20060420065157.GF8671@localhost.localdomain> <44473096.5020004@hasno.info> <20060421135420.GA3754@localhost.localdomain> <4448F6BE.3090309@hasno.info> <20060424224811.GA3970@localhost.localdomain> <444CD8FF.9040509@hasno.info> Message-ID: <20060425004058.GB3970@localhost.localdomain> On Mon, Apr 24, 2006 at 09:56:15AM -0400, Mark Guzman wrote: > Doug Kearns wrote: > > > > Let me know when you're ready to go. > > > > > Doug, > I'm all set at this point, OK, it's getting late here so I'll send it out in the morning unless I get a 'second wind'. It seems there's a number of people waiting on it. I've also sent the latest to Bram. > I'm looking for bugs. Well, the best way to find them is for me to release it. ;-) The only thing I still notice is that something like: x = S Doesn't limit the returned results to those matching the partial string ie. "S". Do you see this as well? Thanks, Doug From now at bitwi.se Mon Apr 24 15:33:38 2006 From: now at bitwi.se (Nikolai Weibull) Date: Mon, 24 Apr 2006 21:33:38 +0200 Subject: comment indentation In-Reply-To: References: <323a37200604210905r22192f24o2793315aaa7dc640@mail.gmail.com> <323a37200604210940y60b295c6m81f18694930502b6@mail.gmail.com> Message-ID: On 4/22/06, Gavin Sinclair wrote: > On 4/22/06, Nikolai Weibull wrote: > > > We used to disable 'smartindent' in indent/ruby.vim, but that's really > > not the place to do so so it was removed. The thing about > > 'smartindent' is that it should only be set in an indent script > > explicitly, not in a users vimrc or similar. 'Smartindent' stems from > > a time before indent scripts and is quite useless under most > > circumstances today. > > Should indent/ruby.vim *disable* smartindent? Yeah, I've discussed this with Bram and he thought it best. So could you please add a nosmartindent to it? Thanks. nikolai From segfault at hasno.info Mon Apr 24 20:26:20 2006 From: segfault at hasno.info (Mark Guzman) Date: Mon, 24 Apr 2006 20:26:20 -0400 Subject: bug removal Message-ID: <444D6CAC.4000704@hasno.info> Doug, I think I've taken care of the bug you found. I wasn't holding onto the input to remove invalid candidates. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From dougkearns at gmail.com Tue Apr 25 09:24:09 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Tue, 25 Apr 2006 23:24:09 +1000 Subject: bug removal In-Reply-To: <444D6CAC.4000704@hasno.info> References: <444D6CAC.4000704@hasno.info> Message-ID: <20060425132409.GC3970@localhost.localdomain> On Mon, Apr 24, 2006 at 08:26:20PM -0400, Mark Guzman wrote: > Doug, > I think I've taken care of the bug you found. I wasn't holding onto > the input to remove invalid candidates. Thanks. It seems that it now only works with leading whitespace though. Something like this fails. x = S but this works S Thanks, Doug From dougkearns at gmail.com Tue Apr 25 13:04:35 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Wed, 26 Apr 2006 03:04:35 +1000 Subject: comment indentation In-Reply-To: References: <323a37200604210905r22192f24o2793315aaa7dc640@mail.gmail.com> <323a37200604210940y60b295c6m81f18694930502b6@mail.gmail.com> Message-ID: <20060425170435.GA2998@localhost.localdomain> On Mon, Apr 24, 2006 at 09:33:38PM +0200, Nikolai Weibull wrote: > On 4/22/06, Gavin Sinclair wrote: > > On 4/22/06, Nikolai Weibull wrote: > > > > > We used to disable 'smartindent' in indent/ruby.vim, but that's really > > > not the place to do so so it was removed. The thing about > > > 'smartindent' is that it should only be set in an indent script > > > explicitly, not in a users vimrc or similar. 'Smartindent' stems from > > > a time before indent scripts and is quite useless under most > > > circumstances today. > > > > Should indent/ruby.vim *disable* smartindent? > > Yeah, I've discussed this with Bram and he thought it best. So could > you please add a nosmartindent to it? > > Thanks. Done. Regards, Doug From dougkearns at gmail.com Tue Apr 25 10:29:50 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Wed, 26 Apr 2006 00:29:50 +1000 Subject: bug removal In-Reply-To: <20060425132409.GC3970@localhost.localdomain> References: <444D6CAC.4000704@hasno.info> <20060425132409.GC3970@localhost.localdomain> Message-ID: <20060425142950.GA9043@localhost.localdomain> On Tue, Apr 25, 2006 at 11:24:09PM +1000, Doug Kearns wrote: > On Mon, Apr 24, 2006 at 08:26:20PM -0400, Mark Guzman wrote: > > Doug, > > I think I've taken care of the bug you found. I wasn't holding onto > > the input to remove invalid candidates. > > Thanks. It seems that it now only works with leading whitespace though. I just had a quick look at this and it seems to be due to the 'workaround' code you introduced in r1.4. Since this cWORD expansion bug has now been fixed in Vim is it still required for any reason? Regards, Doug From segfault at hasno.info Tue Apr 25 11:22:50 2006 From: segfault at hasno.info (Mark Guzman) Date: Tue, 25 Apr 2006 11:22:50 -0400 Subject: bug removal In-Reply-To: <20060425142950.GA9043@localhost.localdomain> References: <444D6CAC.4000704@hasno.info> <20060425132409.GC3970@localhost.localdomain> <20060425142950.GA9043@localhost.localdomain> Message-ID: <444E3ECA.8030307@hasno.info> Doug Kearns wrote: > I just had a quick look at this and it seems to be due to the > 'workaround' code you introduced in r1.4. Since this cWORD expansion bug > has now been fixed in Vim is it still required for any reason? > Thats actually necessary, I may remove the cWORD expansion. cWord will only pull the word after the cursor, so in cases like "abc." we would be passed an empty string and in general we want to know that "abc" was part of the completion. The main problem is the assignment. I assume you'd like it to complete the list of globals. The bug your seeing stems from those two issues, expand("cWORD") -> "" and the line is "x = S". "x=S" ends up being processed, but doesn't strip off the "x=", so it finds no valid completions. I'll add some code to strip off the assignment. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From dougkearns at gmail.com Tue Apr 25 12:05:13 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Wed, 26 Apr 2006 02:05:13 +1000 Subject: bug removal In-Reply-To: <20060425155342.GA16459@localhost.localdomain> References: <444D6CAC.4000704@hasno.info> <20060425132409.GC3970@localhost.localdomain> <20060425142950.GA9043@localhost.localdomain> <444E3ECA.8030307@hasno.info> <20060425155342.GA16459@localhost.localdomain> Message-ID: <20060425160513.GB16459@localhost.localdomain> Mark, There's another related problem. Something like: x. { |foo| puts foo } fails because expands to the following "{". Regards, Doug From dougkearns at gmail.com Tue Apr 25 11:53:42 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Wed, 26 Apr 2006 01:53:42 +1000 Subject: bug removal In-Reply-To: <444E3ECA.8030307@hasno.info> References: <444D6CAC.4000704@hasno.info> <20060425132409.GC3970@localhost.localdomain> <20060425142950.GA9043@localhost.localdomain> <444E3ECA.8030307@hasno.info> Message-ID: <20060425155342.GA16459@localhost.localdomain> On Tue, Apr 25, 2006 at 11:22:50AM -0400, Mark Guzman wrote: > Doug Kearns wrote: > > I just had a quick look at this and it seems to be due to the > > 'workaround' code you introduced in r1.4. Since this cWORD expansion bug > > has now been fixed in Vim is it still required for any reason? > > > Thats actually necessary, I may remove the cWORD expansion. cWord will > only pull the word after the cursor, so in cases like "abc. here>" we would be passed an empty string > and in general we want to know that "abc" was part of the completion. Hmmm, I assumed it would behave like :echo expand(') but it does not... > The main problem is the assignment. I assume you'd like it to complete > the list of globals. Yes, but that really needs a pretty general solution. eg. "x + S" FWIW, I notice that irb doesn't work with "x+S" but does with "x + S". > The bug your seeing stems from those two issues, expand("cWORD") -> "" > and the line is "x = S". "x=S" ends up being processed, > but doesn't strip off the "x=", so it finds no valid completions. I'll > add some code to strip off the assignment. Thanks for your responsiveness. ;-) Thanks, Doug From segfault at hasno.info Wed Apr 26 10:46:12 2006 From: segfault at hasno.info (Mark Guzman) Date: Wed, 26 Apr 2006 10:46:12 -0400 Subject: bug removal In-Reply-To: <20060425160513.GB16459@localhost.localdomain> References: <444D6CAC.4000704@hasno.info> <20060425132409.GC3970@localhost.localdomain> <20060425142950.GA9043@localhost.localdomain> <444E3ECA.8030307@hasno.info> <20060425155342.GA16459@localhost.localdomain> <20060425160513.GB16459@localhost.localdomain> Message-ID: <444F87B4.6010509@hasno.info> Doug Kearns wrote: > Something like: > > x. { |foo| puts foo } > > fails because expands to the following "{". > Doug, I've removed the cWORD expansion, and tested versus that example and a few others. If you get a chance test the current cvs head. It should be able to handle that case, "x=b.+a", "x = b. + a", and "a.foo( b.". In addition, I stripped out a lot of junk in an effort to trim the filesize a bit without changing the indentation. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From dougkearns at gmail.com Wed Apr 26 11:08:38 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Thu, 27 Apr 2006 01:08:38 +1000 Subject: bug removal In-Reply-To: <444F87B4.6010509@hasno.info> References: <444D6CAC.4000704@hasno.info> <20060425132409.GC3970@localhost.localdomain> <20060425142950.GA9043@localhost.localdomain> <444E3ECA.8030307@hasno.info> <20060425155342.GA16459@localhost.localdomain> <20060425160513.GB16459@localhost.localdomain> <444F87B4.6010509@hasno.info> Message-ID: <20060426150838.GA18943@localhost.localdomain> On Wed, Apr 26, 2006 at 10:46:12AM -0400, Mark Guzman wrote: > Doug Kearns wrote: > > Something like: > > > > x. { |foo| puts foo } > > > > fails because expands to the following "{". > > > Doug, > I've removed the cWORD expansion, and tested versus that example and a > few others. If you get a chance test the current cvs head. > It should be able to handle that case, "x=b.+a", "x = > b. + a", and "a.foo( b.". Great. These all work well for me. However, this example is now completing incorrectly. x = "foo" x.chop! offers _only_ "chop!" in the completion list. > In addition, I stripped out a lot of junk in an effort to trim the > filesize a bit without changing the indentation. Don't worry too much about the file size. I just stripped the whitespace because it wasn't doing anything useful. ;-) If the comments are useful to you go for it! Thanks, Doug From dougkearns at gmail.com Wed Apr 26 11:21:22 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Thu, 27 Apr 2006 01:21:22 +1000 Subject: bug removal In-Reply-To: <20060426150838.GA18943@localhost.localdomain> References: <444D6CAC.4000704@hasno.info> <20060425132409.GC3970@localhost.localdomain> <20060425142950.GA9043@localhost.localdomain> <444E3ECA.8030307@hasno.info> <20060425155342.GA16459@localhost.localdomain> <20060425160513.GB16459@localhost.localdomain> <444F87B4.6010509@hasno.info> <20060426150838.GA18943@localhost.localdomain> Message-ID: <20060426152122.GB18943@localhost.localdomain> On Thu, Apr 27, 2006 at 01:08:38AM +1000, Doug Kearns wrote: > > It should be able to handle that case, "x=b.+a", "x = > > b. + a", and "a.foo( b.". This is also broken: a.foo( b.bar, b. it offers only methods starting with bar. Regards, Doug From segfault at hasno.info Wed Apr 26 11:59:32 2006 From: segfault at hasno.info (Mark Guzman) Date: Wed, 26 Apr 2006 11:59:32 -0400 Subject: bug removal In-Reply-To: <20060426152122.GB18943@localhost.localdomain> References: <444D6CAC.4000704@hasno.info> <20060425132409.GC3970@localhost.localdomain> <20060425142950.GA9043@localhost.localdomain> <444E3ECA.8030307@hasno.info> <20060425155342.GA16459@localhost.localdomain> <20060425160513.GB16459@localhost.localdomain> <444F87B4.6010509@hasno.info> <20060426150838.GA18943@localhost.localdomain> <20060426152122.GB18943@localhost.localdomain> Message-ID: <444F98E4.8060909@hasno.info> Doug Kearns wrote: > This is also broken: > > a.foo( b.bar, b. > > it offers only methods starting with bar. > > Doug, Thanks for testing so quickly. I believe I have just checked in a version that takes care of the two issues you found. I've found another issue, involving Range definitions which I'm looking into. a = 1..10 a. returns string's list as its guessing. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From segfault at hasno.info Thu Apr 27 14:41:59 2006 From: segfault at hasno.info (Mark Guzman) Date: Thu, 27 Apr 2006 14:41:59 -0400 Subject: complete status Message-ID: <44511077.5050304@hasno.info> All, I've fixed/added Range variable detection support. So now x=1..2 should be picked up as a Range properly. I noticed while testing it that 1..2. is not completed. The same goes for [1,2] and {1,2}. I use that type of stuff for iteration some times, so I'll be adding support for that. Please test the current cvs version if possible. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From dougkearns at gmail.com Fri Apr 28 10:46:48 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Sat, 29 Apr 2006 00:46:48 +1000 Subject: complete status In-Reply-To: <44511077.5050304@hasno.info> References: <44511077.5050304@hasno.info> Message-ID: <20060428144648.GA4532@localhost.localdomain> On Thu, Apr 27, 2006 at 02:41:59PM -0400, Mark Guzman wrote: > All, > I've fixed/added Range variable detection support. So now x=1..2 > should be picked up as a Range properly. > I noticed while testing it that 1..2. is not completed. The > same goes for [1,2] and {1,2}. I use that type of > stuff for iteration some times, so I'll be adding support for that. > Please test the current cvs version if possible. Looks good. The symbol problem is still there though ie "::name" is inserted. Regards, Doug PS. Should we forward this one up to B? From segfault at hasno.info Fri Apr 28 13:09:57 2006 From: segfault at hasno.info (Mark Guzman) Date: Fri, 28 Apr 2006 13:09:57 -0400 Subject: complete status In-Reply-To: <20060428144648.GA4532@localhost.localdomain> References: <44511077.5050304@hasno.info> <20060428144648.GA4532@localhost.localdomain> Message-ID: <44524C65.9010708@hasno.info> Doug Kearns wrote: > > Looks good. > > The symbol problem is still there though ie "::name" is inserted. > > Regards, > Doug > > PS. Should we forward this one up to B? > Doug, I've taken care of the ::name bug, or so it seems. I think this is a good one to send to Bram. I'll continue testing on my end. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From gsinclair at gmail.com Fri Apr 28 20:51:16 2006 From: gsinclair at gmail.com (Gavin Sinclair) Date: Sat, 29 Apr 2006 10:51:16 +1000 Subject: complete status In-Reply-To: <44524C65.9010708@hasno.info> References: <44511077.5050304@hasno.info> <20060428144648.GA4532@localhost.localdomain> <44524C65.9010708@hasno.info> Message-ID: On 4/29/06, Mark Guzman wrote: > > > Doug, > I've taken care of the ::name bug, or so it seems. I think this is a > good one to send to Bram. I'll continue testing on my end. > --mark Thanks for all the work on this, chaps. I haven't even tried it yet (shame on me). Gotta get me some of that Vim 7.0! Cheers, Gavin From dougkearns at gmail.com Sun Apr 30 03:38:14 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Sun, 30 Apr 2006 17:38:14 +1000 Subject: complete status In-Reply-To: <44511077.5050304@hasno.info> References: <44511077.5050304@hasno.info> Message-ID: <20060430073814.GA3013@localhost.localdomain> On Thu, Apr 27, 2006 at 02:41:59PM -0400, Mark Guzman wrote: > Please test the current cvs version if possible. class Foobar < String def end If you change the superclass of Foobar after the buffer has been 'loaded' attempting completion results in: Error detected while processing function rubycomplete#Complete: line 22: TypeError: (eval):71:in `load_buffer_class': (eval):1:in `load_buffer_class': superclass mismatch for class Foobar Which is inconsistent with its behaviour prior to changing the superclass. Regards, Doug From gsinclair at gmail.com Sun Apr 30 05:27:16 2006 From: gsinclair at gmail.com (Gavin Sinclair) Date: Sun, 30 Apr 2006 19:27:16 +1000 Subject: How to switch between files in Vim? Message-ID: Hi folks, Just wondering... If you have a lot of files open in Vim, how do you switch to the one you want in the easiest fashion? In my Rails project, there are lots of files (models, views, controllers, helpers, javascript, etc.) and I need to flick around between them. I use and highly recommend the Project plugin, but ideally I could just type in a few characters from the filename and go there. The perfect interface would be something like this. Say I want to switch to "user_controller.rb". - CTRL-G (for Goto file) pops up a small window where I can type letters and it can display some matching filenames - I type "user" and it narrows it down to about 6 files - I hit space and type "cont", which is enough to score a unique match - I hit ENTER and that file opens Now that's not really achievable with the interface Vim has, but I'm wondering: - Does anybody know a plugin that provides this as best it can? - Does anybody have a different approach they use for selecting files? A bit off topic, I know! Cheers, Gavin From now at bitwi.se Sun Apr 30 08:31:56 2006 From: now at bitwi.se (Nikolai Weibull) Date: Sun, 30 Apr 2006 14:31:56 +0200 Subject: Matchit and parentheses Message-ID: Why not add ",(:),{:},[:]" to the end of b:match_words so that we take advantage of our knowledge of the language to skip parentheses and braces and so on inside comments? nikolai From dougkearns at gmail.com Sun Apr 30 10:37:32 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Mon, 1 May 2006 00:37:32 +1000 Subject: How to switch between files in Vim? In-Reply-To: References: Message-ID: <20060430143732.GB3013@localhost.localdomain> On Sun, Apr 30, 2006 at 07:27:16PM +1000, Gavin Sinclair wrote: > Hi folks, > > Just wondering... > > If you have a lot of files open in Vim, how do you switch to the one > you want in the easiest fashion? :help buffer :b N or :b filename I find that if there's a manageable amount, say less than 10, you can generally remember the buffer number. If there's more than that then I use the second method. > In my Rails project, there are lots of files (models, views, > controllers, helpers, javascript, etc.) and I need to flick around > between them. I use and highly recommend the Project plugin, but > ideally I could just type in a few characters from the filename and go > there. > > The perfect interface would be something like this. Say I want to > switch to "user_controller.rb". > > - CTRL-G (for Goto file) pops up a small window where I can type > letters and it can display some matching filenames :b > - I type "user" and it narrows it down to about 6 files :b user A mapping is useful here. Something like: :cmap > - I hit space and type "cont", which is enough to score a unique match :b user_cont > - I hit ENTER and that file opens :b user_controller.rb HTH, Doug From segfault at hasno.info Sun Apr 30 13:07:18 2006 From: segfault at hasno.info (Mark Guzman) Date: Sun, 30 Apr 2006 13:07:18 -0400 Subject: complete status In-Reply-To: <20060430073814.GA3013@localhost.localdomain> References: <44511077.5050304@hasno.info> <20060430073814.GA3013@localhost.localdomain> Message-ID: <4454EEC6.2090104@hasno.info> Doug Kearns wrote: > On Thu, Apr 27, 2006 at 02:41:59PM -0400, Mark Guzman wrote: > > > > >> Please test the current cvs version if possible. >> > > class Foobar < String > def > end > > If you change the superclass of Foobar after the buffer has been > 'loaded' attempting completion results in: > > Error detected while processing function rubycomplete#Complete: > line 22: > TypeError: (eval):71:in `load_buffer_class': (eval):1:in `load_buffer_class': superclass mismatch for class Foobar > > Which is inconsistent with its behaviour prior to changing the > superclass. > > Regards, > Doug > Doug, Unfortunatly I can't seem to reset the ruby session in vim. So once you load a class definition your stuck with the basic definition. What you did attempted to reload the class, which would add on any new methods normally. Its inconsistent because its effectively invalid, imagine defining Foobar in a file and then later in the file defining it again with a superclass. Ruby would spit out the same error. I'm not entirely sure what can be done in that case. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From gsinclair at gmail.com Mon May 1 00:39:49 2006 From: gsinclair at gmail.com (Gavin Sinclair) Date: Mon, 1 May 2006 14:39:49 +1000 Subject: How to switch between files in Vim? In-Reply-To: <20060430143732.GB3013@localhost.localdomain> References: <20060430143732.GB3013@localhost.localdomain> Message-ID: On 5/1/06, Doug Kearns wrote: > > :help buffer > > :b N > or > :b filename > > I find that if there's a manageable amount, say less than 10, you can > generally remember the buffer number. If there's more than that then I > use the second method. I've always thought of the :b command as rather primitive. Thanks to your suggestions on its usage (snipped) and the command-line mapping, though, I'll give it another try. In my project, I tend to have about 40 files open at once. Thanks, Gavin From dougkearns at gmail.com Mon May 1 03:06:14 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Mon, 1 May 2006 17:06:14 +1000 Subject: complete status In-Reply-To: <4454EEC6.2090104@hasno.info> References: <44511077.5050304@hasno.info> <20060430073814.GA3013@localhost.localdomain> <4454EEC6.2090104@hasno.info> Message-ID: <20060501070614.GA28271@localhost.localdomain> On Sun, Apr 30, 2006 at 01:07:18PM -0400, Mark Guzman wrote: > Doug Kearns wrote: > > If you change the superclass of Foobar after the buffer has been > > 'loaded' attempting completion results in: > > > > Error detected while processing function rubycomplete#Complete: > > line 22: > > TypeError: (eval):71:in `load_buffer_class': (eval):1:in `load_buffer_class': superclass mismatch for class Foobar > > > > Which is inconsistent with its behaviour prior to changing the > > superclass. > > > > Regards, > > Doug > > > Doug, > Unfortunatly I can't seem to reset the ruby session in vim. So once > you load a class definition your stuck with the basic definition. What > you did attempted to reload the class, which would add on any new > methods normally. Its inconsistent because its effectively invalid, > imagine defining Foobar in a file and then later in the file defining it > again with a superclass. Ruby would spit out the same error. I'm not > entirely sure what can be done in that case. Yes. I was really just wondering if we should, in the long term, be catching these errors and outputting a more 'meaningful' error message. I'm not sure allowing these to leak out as Vim errors is the best approach. You'd be surprised how many users won't be able/willing to determine the cause of the problem and see the script as simply broken. Hopefully, I'll have some time to help you out soon...hopefully. Thanks, Doug From dougkearns at gmail.com Mon May 1 03:07:05 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Mon, 1 May 2006 17:07:05 +1000 Subject: Matchit and parentheses In-Reply-To: References: Message-ID: <20060501070705.GB28271@localhost.localdomain> On Sun, Apr 30, 2006 at 02:31:56PM +0200, Nikolai Weibull wrote: > Why not add ",(:),{:},[:]" to the end of b:match_words so that we take > advantage of our knowledge of the language to skip parentheses and > braces and so on inside comments? Seems like a good idea. Hmmm, it doesn't seem to work for me though... Regards, Doug From now at bitwi.se Mon May 1 05:36:36 2006 From: now at bitwi.se (Nikolai Weibull) Date: Mon, 1 May 2006 11:36:36 +0200 Subject: Matchit and parentheses In-Reply-To: <20060501070705.GB28271@localhost.localdomain> References: <20060501070705.GB28271@localhost.localdomain> Message-ID: On 5/1/06, Doug Kearns wrote: > On Sun, Apr 30, 2006 at 02:31:56PM +0200, Nikolai Weibull wrote: > > Why not add ",(:),{:},[:]" to the end of b:match_words so that we take > > advantage of our knowledge of the language to skip parentheses and > > braces and so on inside comments? > > Seems like a good idea. > > Hmmm, it doesn't seem to work for me though... let b:match_words = \ '\%(' . \ '\%(\%(\.\|\:\:\)\s*\|\:\)\@' . \ '\|' . \ '\%(\%(^\|\.\.\.\=\|[\,;=([<>~\*/%!&^|+-]\)\s*\)\@<=\%(if\|unless\|until\|while\)\>' . \ '\)' . \ ':' . \ '\%(' . \ '\%(\%(\.\|\:\:\)\s*\|\:\)\@' . \ '\|' . \ '\%(\%(^\|;\)\s*\)\@<=\' . \ '\)' . \ ':' . \ '\%(\%(\.\|\:\:\)\s*\|\:\)\@' . ',{:},[:],(:)' works for me. From dougkearns at gmail.com Mon May 1 05:55:19 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Mon, 1 May 2006 19:55:19 +1000 Subject: Matchit and parentheses In-Reply-To: References: <20060501070705.GB28271@localhost.localdomain> Message-ID: <20060501095519.GD28271@localhost.localdomain> On Mon, May 01, 2006 at 11:36:36AM +0200, Nikolai Weibull wrote: > On 5/1/06, Doug Kearns wrote: > > On Sun, Apr 30, 2006 at 02:31:56PM +0200, Nikolai Weibull wrote: > > > Why not add ",(:),{:},[:]" to the end of b:match_words so that we take > > > advantage of our knowledge of the language to skip parentheses and > > > braces and so on inside comments? > > > > Seems like a good idea. > > > > Hmmm, it doesn't seem to work for me though... > works for me. So the commented ']' is skipped? [1, # ] 2, 3, 4] Regards, Doug From segfault at hasno.info Mon May 1 10:09:06 2006 From: segfault at hasno.info (Mark Guzman) Date: Mon, 01 May 2006 10:09:06 -0400 Subject: complete status In-Reply-To: <20060501070614.GA28271@localhost.localdomain> References: <44511077.5050304@hasno.info> <20060430073814.GA3013@localhost.localdomain> <4454EEC6.2090104@hasno.info> <20060501070614.GA28271@localhost.localdomain> Message-ID: <44561682.4060903@hasno.info> Doug Kearns wrote: > > Yes. I was really just wondering if we should, in the long term, be > catching these errors and outputting a more 'meaningful' error message. > > I'm not sure allowing these to leak out as Vim errors is the best > approach. You'd be surprised how many users won't be able/willing to > determine the cause of the problem and see the script as simply broken. > > Hopefully, I'll have some time to help you out soon...hopefully. > > Ahh, ok. I'll add some error handling around that spot. Something meaningful like 'The class "Foobar" was already loaded, the new definition conflicts with the old. Unable to determine completion.' Some of these things don't occur naturally in my thought process yet, I guess I'm a bit to much of a tinkerer. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From sroberts at uniserve.com Mon May 1 11:33:08 2006 From: sroberts at uniserve.com (Sam Roberts) Date: Mon, 1 May 2006 08:33:08 -0700 Subject: How to switch between files in Vim? In-Reply-To: References: <20060430143732.GB3013@localhost.localdomain> Message-ID: <20060501153308.GC15045@pebble> Another approach might be to use tags. exhuberant ctags has a mode (--extra=+f) that will emit tags for filenames, so you can to :ta fi to show completetions for filenames starting with "fi" and jump to it. I use that mostly for jumping between files. There are tag command variants to make new buffers, split windows and jump in the next window, etc. Cheers, Sam From now at bitwi.se Mon May 1 14:28:38 2006 From: now at bitwi.se (Nikolai Weibull) Date: Mon, 1 May 2006 20:28:38 +0200 Subject: Matchit and parentheses In-Reply-To: <20060501095519.GD28271@localhost.localdomain> References: <20060501070705.GB28271@localhost.localdomain> <20060501095519.GD28271@localhost.localdomain> Message-ID: On 5/1/06, Doug Kearns wrote: > On Mon, May 01, 2006 at 11:36:36AM +0200, Nikolai Weibull wrote: > > On 5/1/06, Doug Kearns wrote: > > > On Sun, Apr 30, 2006 at 02:31:56PM +0200, Nikolai Weibull wrote: > > > > Why not add ",(:),{:},[:]" to the end of b:match_words so that we take > > > > advantage of our knowledge of the language to skip parentheses and > > > > braces and so on inside comments? > > > > > > Seems like a good idea. > > > > > > Hmmm, it doesn't seem to work for me though... > > > > > works for me. > > So the commented ']' is skipped? > > [1, > # ] > 2, > 3, > 4] No. The commented '}' is skipped. { a => 1, b => 2 # Set b to 2 } } The "[...]" don't match up because matchit.vim doesn't escape the '[' and ']'... I'll email Benji about it. nikolai From now at bitwi.se Mon May 1 14:59:59 2006 From: now at bitwi.se (Nikolai Weibull) Date: Mon, 1 May 2006 20:59:59 +0200 Subject: Matchit and parentheses In-Reply-To: References: <20060501070705.GB28271@localhost.localdomain> <20060501095519.GD28271@localhost.localdomain> Message-ID: On 5/1/06, Nikolai Weibull wrote: > On 5/1/06, Doug Kearns wrote: > > On Mon, May 01, 2006 at 11:36:36AM +0200, Nikolai Weibull wrote: > > > On 5/1/06, Doug Kearns wrote: > > > > On Sun, Apr 30, 2006 at 02:31:56PM +0200, Nikolai Weibull wrote: > > > > > Why not add ",(:),{:},[:]" to the end of b:match_words so that we take > > > > > advantage of our knowledge of the language to skip parentheses and > > > > > braces and so on inside comments? > > > > > > > > Seems like a good idea. > > > > > > > > Hmmm, it doesn't seem to work for me though... > > > > > > > > > works for me. > > > > So the commented ']' is skipped? > > > > [1, > > # ] > > 2, > > 3, > > 4] > > No. The commented '}' is skipped. > > { a => 1, > b => 2 # Set b to 2 } > } > > The "[...]" don't match up because matchit.vim doesn't escape the '[' and ']'... I'm thinking too much. Just escape the '[' and ']' metacharacters and it works fine. nikolai From dougkearns at gmail.com Fri May 5 03:11:57 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Fri, 5 May 2006 17:11:57 +1000 Subject: Matchit and parentheses In-Reply-To: References: Message-ID: <20060505071157.GA28580@localhost.localdomain> On Sun, Apr 30, 2006 at 02:31:56PM +0200, Nikolai Weibull wrote: > Why not add ",(:),{:},[:]" to the end of b:match_words so that we take > advantage of our knowledge of the language to skip parentheses and > braces and so on inside comments? Done. Regards, Doug From dougkearns at gmail.com Sun May 7 03:13:58 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Sun, 7 May 2006 17:13:58 +1000 Subject: complete status In-Reply-To: <44561682.4060903@hasno.info> References: <44511077.5050304@hasno.info> <20060430073814.GA3013@localhost.localdomain> <4454EEC6.2090104@hasno.info> <20060501070614.GA28271@localhost.localdomain> <44561682.4060903@hasno.info> Message-ID: <20060507071358.GA3411@localhost.localdomain> On Mon, May 01, 2006 at 10:09:06AM -0400, Mark Guzman wrote: > Ahh, ok. I'll add some error handling around that spot. Something > meaningful like 'The class "Foobar" was already loaded, the new > definition conflicts with the old. Unable to determine completion.' > Some of these things don't occur naturally in my thought process yet, I > guess I'm a bit to much of a tinkerer. It seems these new error messages are not seen because the standard Omni status line is overwriting them. The completion list is also just returning the initially loaded classes methods in this context. I thinks it's better to fail in this case and return an empty list. Is there something better than calling sleep to enable the user to read an internally generated message? Regards, Doug From dougkearns at gmail.com Sun May 7 03:53:14 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Sun, 7 May 2006 17:53:14 +1000 Subject: PATCH: make complete functions and variables local to script Message-ID: <20060507075314.GB3411@localhost.localdomain> Mark, Are any of these functions/variables going to be of any use outside the completion script? Regards, Doug Index: autoload/rubycomplete.vim =================================================================== RCS file: /var/cvs/vim-ruby/vim-ruby/autoload/rubycomplete.vim,v retrieving revision 1.25 diff -u -r1.25 rubycomplete.vim --- autoload/rubycomplete.vim 7 May 2006 07:48:11 -0000 1.25 +++ autoload/rubycomplete.vim 7 May 2006 07:49:38 -0000 @@ -1,7 +1,7 @@ " Vim completion script " Language: Ruby " Maintainer: Mark Guzman -" Info: $Id: rubycomplete.vim,v 1.25 2006/05/07 07:48:11 dkearns Exp $ +" Info: $Id: rubycomplete.vim,v 1.24 2006/05/02 03:32:11 segy Exp $ " URL: http://vim-ruby.rubyforge.org " Anon CVS: See above site " Release Coordinator: Doug Kearns @@ -35,20 +35,20 @@ endif " {{{ vim-side support functions -function! GetBufferRubyModule(name) - let [snum,enum] = GetBufferRubyEntity(a:name, "module") +function! s:GetBufferRubyModule(name) + let [snum,enum] = s:GetBufferRubyEntity(a:name, "module") return snum . '..' . enum endfunction -function! GetBufferRubyClass(name) - let [snum,enum] = GetBufferRubyEntity(a:name, "class") +function! s:GetBufferRubyClass(name) + let [snum,enum] = s:GetBufferRubyEntity(a:name, "class") return snum . '..' . enum endfunction -function! GetBufferRubySingletonMethods(name) +function! s:GetBufferRubySingletonMethods(name) endfunction -function! GetBufferRubyEntity( name, type ) +function! s:GetBufferRubyEntity( name, type ) let stopline = 1 let crex = '^\s*' . a:type . '\s*' . a:name . '\s*\(<\s*.*\s*\)\?\n*\(\(\s\|#\).*\n*\)*\n*\s*end$' let [lnum,lcol] = searchpos( crex, 'nbw') @@ -66,8 +66,8 @@ return [lnum,enum] endfunction -function! IsInClassDef() - let [snum,enum] = GetBufferRubyEntity( '.*', "class" ) +function! s:IsInClassDef() + let [snum,enum] = s:GetBufferRubyEntity( '.*', "class" ) let ret = 'nil' let pos = line('.') @@ -78,7 +78,7 @@ return ret endfunction -function! GetRubyVarType(v) +function! s:GetRubyVarType(v) let stopline = 1 let vtp = '' let pos = getpos('.') @@ -90,7 +90,7 @@ return vtp endif call setpos('.',pos) - if g:rubycomplete_rails == 1 && g:rubycomplete_rails_loaded == 1 + if g:rubycomplete_rails == 1 && s:rubycomplete_rails_loaded == 1 let ctors = '\(now\|new\|open\|get_instance\|find\|create\)' else let ctors = '\(now\|new\|open\|get_instance\)' @@ -199,7 +199,7 @@ end def load_buffer_class(name) - classdef = get_buffer_entity(name, 'GetBufferRubyClass("%s")') + classdef = get_buffer_entity(name, 's:GetBufferRubyClass("%s")') return if classdef == nil pare = /^\s*class\s*(.*)\s*<\s*(.*)\s*\n/.match( classdef ) @@ -216,7 +216,7 @@ end def load_buffer_module(name) - classdef = get_buffer_entity(name, 'GetBufferRubyModule("%s")') + classdef = get_buffer_entity(name, 's:GetBufferRubyModule("%s")') return if classdef == nil begin @@ -249,7 +249,7 @@ if /(\"|\')+/.match( receiver ) "String" else - VIM::evaluate("GetRubyVarType('%s')" % receiver) + VIM::evaluate("s:GetRubyVarType('%s')" % receiver) end end @@ -301,7 +301,7 @@ require envfile require 'console_app' require 'console_with_helpers' - VIM::command('let g:rubycomplete_rails_loaded = 1') + VIM::command('let s:rubycomplete_rails_loaded = 1') rescue print "Error loading rails environment" end @@ -310,7 +310,7 @@ def get_rails_helpers allow_rails = VIM::evaluate('g:rubycomplete_rails') - rails_loaded = VIM::evaluate('g:rubycomplete_rails_loaded') + rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded') return [] if allow_rails != '1' || rails_loaded != '1' return RailsWords end @@ -442,7 +442,7 @@ candidates = String.instance_methods(true) else - inclass = eval( VIM::evaluate("IsInClassDef()") ) + inclass = eval( VIM::evaluate("s:IsInClassDef()") ) if inclass != nil classdef = "%s\n" % VIM::Buffer.current[ inclass.min ] @@ -492,7 +492,7 @@ RUBYEOF endfunction -let g:rubycomplete_rails_loaded = 0 +let s:rubycomplete_rails_loaded = 0 call s:DefRuby() " vim:tw=78:sw=4:ts=8:et:fdm=marker:ft=vim:norl: From dougkearns at gmail.com Sun May 7 07:44:41 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Sun, 7 May 2006 21:44:41 +1000 Subject: PATCH: determine word to be completed like Readline Message-ID: <20060507114440.GC3411@localhost.localdomain> Mark, I was having some problems completing single element array literals: [a]. # we need a shorthand for the completion point This was being fed to the completion case expression as "a." rather than "[a].". Excuse me if I'm overlooking some obvious issues; I've only just started to have a look at your script now. ;-) But I was wondering if it would be better to keep rubycomplete.vim closer to irb/completion.rb? For example, is there a reason we couldn't simplify determining the word to be completed by feeding get_completions(), essentially the irb readline completion proc, _exactly_ the same input that it would be receiving from Readline in irb? (See patch below.) Then, as rubycomplete.vim is improved, we could, very simply, feed those improvements back into irb/complete.rb and vice versa? You've added Range literal completion which should be included in irb and I can also see some simple improvements we could make to the Readline.basic_word_break_characters pattern. Would this cost us anything in terms of functionality? I guess the ultimate solution would be to find a way to use IRB::InputCompletor::CompletionProc directly... Regards, Doug PS. Why are there two when clauses for Array? Index: autoload/rubycomplete.vim =================================================================== RCS file: /var/cvs/vim-ruby/vim-ruby/autoload/rubycomplete.vim,v retrieving revision 1.25 diff -u -r1.25 rubycomplete.vim --- autoload/rubycomplete.vim 7 May 2006 07:48:11 -0000 1.25 +++ autoload/rubycomplete.vim 7 May 2006 11:36:19 -0000 @@ -321,20 +321,10 @@ input = VIM::Buffer.current.line cpos = VIM::Window.current.cursor[1] - 1 - input = input[0..cpos] if cpos != 0 + input = input[0..cpos] input += base - rip = input.rindex(/\s/,cpos) - if rip - input = input[rip..input.length] - end - - asn = /^.*(\+|\-|\*|=|\(|\[)=?(\s*[A-Za-z0-9_:@.-]*)(\s*(\{|\+|\-|\*|\%|\/)?\s*).*/ - if asn.match(input) - input = $2 - end - - input.strip! + input = input.sub(/.*[ \t\n\"\\'`><=;|&{(]/, '') # Readline.basic_word_break_characters message = nil receiver = nil candidates = [] From segfault at hasno.info Sun May 7 16:39:41 2006 From: segfault at hasno.info (Mark Guzman) Date: Sun, 07 May 2006 16:39:41 -0400 Subject: PATCH: make complete functions and variables local to script In-Reply-To: <20060507075314.GB3411@localhost.localdomain> References: <20060507075314.GB3411@localhost.localdomain> Message-ID: <445E5B0D.6060803@hasno.info> Doug Kearns wrote: > Mark, > > Are any of these functions/variables going to be of any use outside the > completion script? > > Regards, > Doug > Doug, Seems fine by me. I've applied the patch and checked it in. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From segfault at hasno.info Sun May 7 17:07:21 2006 From: segfault at hasno.info (Mark Guzman) Date: Sun, 07 May 2006 17:07:21 -0400 Subject: PATCH: determine word to be completed like Readline In-Reply-To: <20060507114440.GC3411@localhost.localdomain> References: <20060507114440.GC3411@localhost.localdomain> Message-ID: <445E6189.3090303@hasno.info> Doug Kearns wrote: > Mark, > > I was having some problems completing single element array literals: > > [a]. # we need a shorthand for the completion point > > This was being fed to the completion case expression as "a." rather > than "[a].". > > Excuse me if I'm overlooking some obvious issues; I've only just started > to have a look at your script now. ;-) But I was wondering if it would > be better to keep rubycomplete.vim closer to irb/completion.rb? > > For example, is there a reason we couldn't simplify determining the word > to be completed by feeding get_completions(), essentially the irb > readline completion proc, _exactly_ the same input that it would be > receiving from Readline in irb? (See patch below.) Then, as > rubycomplete.vim is improved, we could, very simply, feed those > improvements back into irb/complete.rb and vice versa? > > You've added Range literal completion which should be included in irb > and I can also see some simple improvements we could make to the > Readline.basic_word_break_characters pattern. > > Would this cost us anything in terms of functionality? > > I guess the ultimate solution would be to find a way to use > IRB::InputCompletor::CompletionProc directly... > > Regards, > Doug > > PS. Why are there two when clauses for Array? > > > The readline regex does fix the single element problem, it also breaks x=a+b+c. I generally put spacing in my code, so I'm not worried about x=a+b+c, but it was an item you raised earlier. As far as using irb/complete.rb directly, I think there are a good number of differences precluding that. Its possible, but I'm not sure there would be much benefit. The actual method list evaluation code in complete.rb would have to be rethought. Classloading would have to be rethought amongst other things. I'm all for providing patches to complete.rb, but I don't see complete.rb going the same place. I'd like to add some more information to what we put in the dictionary, along with variable completion. The second array clause was a test item left in by me. I've applied the patch you sent and removed that array code. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From dougkearns at gmail.com Mon May 8 07:20:33 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Mon, 8 May 2006 21:20:33 +1000 Subject: PATCH: determine word to be completed like Readline In-Reply-To: <445E6189.3090303@hasno.info> References: <20060507114440.GC3411@localhost.localdomain> <445E6189.3090303@hasno.info> Message-ID: <20060508112033.GD3411@localhost.localdomain> On Sun, May 07, 2006 at 05:07:21PM -0400, Mark Guzman wrote: > Doug Kearns wrote: > The readline regex does fix the single element problem, it also breaks > x=a+b+c. Yes - an example of some of the improvements we could make to that pattern. > I generally put spacing in my code, so I'm not worried about x=a+b+c, > but it was an item you raised earlier. I'm a pedant and a contrary one at that. ;-) > As far as using irb/complete.rb directly, I think there are a good > number of differences precluding that. Its possible, > but I'm not sure there would be much benefit. The actual method list > evaluation code in complete.rb would have to be rethought. > Classloading would have to be rethought amongst other things. I'm all > for providing patches to complete.rb, but I don't see > complete.rb going the same place. I'd like to add some more information > to what we put in the dictionary, along with variable completion. Is there any reasonable way, ignoring performance issues, to get the 'binding' at the completion point? > The second array clause was a test item left in by me. I've applied the > patch you sent and removed that array code. I was thinking of it more as a discussion point. I assume it makes sense then? ;-) Regards, Doug From dougkearns at gmail.com Mon May 8 10:34:28 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Tue, 9 May 2006 00:34:28 +1000 Subject: PATCH: highlight operators Message-ID: <20060508143428.GE3411@localhost.localdomain> For those of you who've long had a burning desire for operator highlighting, here's an initial stab at it. It's disabled by default - define "ruby_operators" if you're interested. What? No?...me neither. Look, it's a rainbow! Regards, Doug Index: syntax/ruby.vim =================================================================== RCS file: /var/cvs/vim-ruby/vim-ruby/syntax/ruby.vim,v retrieving revision 1.85 retrieving revision 1.86 diff -u -r1.85 -r1.86 --- syntax/ruby.vim 8 May 2006 06:53:23 -0000 1.85 +++ syntax/ruby.vim 8 May 2006 11:07:59 -0000 1.86 @@ -1,7 +1,7 @@ " Vim syntax file " Language: Ruby " Maintainer: Doug Kearns -" Info: $Id: ruby.vim,v 1.85 2006/05/08 06:53:23 dkearns Exp $ +" Info: $Id: ruby.vim,v 1.86 2006/05/08 11:07:59 dkearns Exp $ " URL: http://vim-ruby.rubyforge.org " Anon CVS: See above site " Release Coordinator: Doug Kearns @@ -32,6 +32,11 @@ endif endif +if exists("ruby_operators") + syn match rubyOperator "\%(\^\|\~\|\%(class\s*\)\@\|<=\|\%(<\|\>\|>=\|>\||\|-\|/\|\*\*\|\*\|&\|%\|+\)" + syn region rubyBracketOperator matchgroup=rubyOperator start="\%([_[:lower:]]\w*[?!=]\=\|}\)\@<=\[\s*" end="\s*]" +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 @@ -71,7 +76,11 @@ syn match rubySymbol ":\@_,;:!?/.'"@$*\&+0]\)" syn match rubySymbol ":\@\|{\)\s*\)\@<=|\s*\zs[( ,a-zA-Z0-9_*)]\+\ze\s*|" display +if exists("ruby_operators") + syn match rubyBlockParameter "\%(\%(\%(\\|{\)\s*\)|\s*\)\@<=[( ,a-zA-Z0-9_*)]\+\%(\s*|\)\@=" display +else + syn match rubyBlockParameter "\%(\%(\\|{\)\s*\)\@<=|\s*\zs[( ,a-zA-Z0-9_*)]\+\ze\s*|" display +endif syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~1-9]# syn match rubyPredefinedVariable "$_\>" display From dougkearns at gmail.com Tue May 9 07:49:28 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Tue, 9 May 2006 21:49:28 +1000 Subject: PATCH: highlight comment blocks Message-ID: <20060509114928.GF3411@localhost.localdomain> This enables folding of multiline comment blocks and is enabled by default. It can be disabled by defining the ruby_no_comment_fold variable. I'm going to have a look at simplifying the syntax based folding. It seems to me that it might be best to reduce it to simply folding module/class/method definitions, comment blocks, and __END__ data blocks. Would anyone object to longer having the rest folded? If so, that too could be configurable. ;-) Any thoughts? Thanks, Doug Index: syntax/ruby.vim =================================================================== RCS file: /var/cvs/vim-ruby/vim-ruby/syntax/ruby.vim,v retrieving revision 1.87 retrieving revision 1.89 diff -u -r1.87 -r1.89 --- syntax/ruby.vim 8 May 2006 15:25:57 -0000 1.87 +++ syntax/ruby.vim 9 May 2006 11:39:41 -0000 1.89 @@ -1,7 +1,7 @@ " Vim syntax file " Language: Ruby " Maintainer: Doug Kearns -" Info: $Id: ruby.vim,v 1.87 2006/05/08 15:25:57 dkearns Exp $ +" Info: $Id: ruby.vim,v 1.89 2006/05/09 11:39:41 dkearns Exp $ " URL: http://vim-ruby.rubyforge.org " Anon CVS: See above site " Release Coordinator: Doug Kearns @@ -211,7 +211,10 @@ syn match rubySharpBang "\%^#!.*" display syn keyword rubyTodo FIXME NOTE TODO XXX contained syn match rubyComment "#.*" contains=rubySharpBang,rubySpaceError,rubyTodo, at Spell -syn region rubyDocumentation start="^=begin" end="^=end.*$" contains=rubySpaceError,rubyTodo, at Spell fold +if !exists("ruby_no_comment_fold") + syn match rubyMultiLineComment "\(^\s*#.*\n\)\{2,}" contains=rubyComment transparent fold + syn region rubyDocumentation start="^=begin" end="^=end.*$" contains=rubySpaceError,rubyTodo, at Spell fold +endif " Note: this is a hack to prevent 'keywords' being highlighted as such when called as methods with an explicit receiver syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE From segfault at hasno.info Tue May 9 16:11:34 2006 From: segfault at hasno.info (Mark Guzman) Date: Tue, 09 May 2006 16:11:34 -0400 Subject: PATCH: determine word to be completed like Readline In-Reply-To: <20060508112033.GD3411@localhost.localdomain> References: <20060507114440.GC3411@localhost.localdomain> <445E6189.3090303@hasno.info> <20060508112033.GD3411@localhost.localdomain> Message-ID: <4460F776.2070708@hasno.info> Doug Kearns wrote: > Yes - an example of some of the improvements we could make to that > pattern. > > Hopefully irb and VimRegEx will make it happen. > > I'm a pedant and a contrary one at that. ;-) > Features and fixes are always good, I just like to have some idea of priority with them. > > > > Is there any reasonable way, ignoring performance issues, to get the > 'binding' at the completion point? > I'm not sure right now, I'm wracking my brain over the issue. > I was thinking of it more as a discussion point. I assume it makes sense > then? ;-) > > Regards, > Doug > _______________________________________________ > vim-ruby-devel mailing list > vim-ruby-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/vim-ruby-devel > -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From dougkearns at gmail.com Wed May 10 02:56:25 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Wed, 10 May 2006 16:56:25 +1000 Subject: PATCH: determine word to be completed like Readline In-Reply-To: <4460F776.2070708@hasno.info> References: <20060507114440.GC3411@localhost.localdomain> <445E6189.3090303@hasno.info> <20060508112033.GD3411@localhost.localdomain> <4460F776.2070708@hasno.info> Message-ID: <20060510065624.GG3411@localhost.localdomain> On Tue, May 09, 2006 at 04:11:34PM -0400, Mark Guzman wrote: > Doug Kearns wrote: > > Yes - an example of some of the improvements we could make to that > > pattern. > > > > > Hopefully irb and VimRegEx will make it happen. Are there any other regressions resulting from this 'new' pattern? I haven't noticed any... > > I'm a pedant and a contrary one at that. ;-) > > > Features and fixes are always good, I just like to have some idea of > priority with them. You're the boss man. ;-) Regards, Doug From dougkearns at gmail.com Wed May 10 03:03:13 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Wed, 10 May 2006 17:03:13 +1000 Subject: PATCH: use exists() when testing config variables Message-ID: <20060510070313.GH3411@localhost.localdomain> Mark, I noticed that unsetting a config variable with 'unlet' broke the completion script. In general, when testing boolean config variables in the Vim runtime files, it's just a test to see whether they're defined or not with exists(). Regards, Doug Index: autoload/rubycomplete.vim =================================================================== RCS file: /var/cvs/vim-ruby/vim-ruby/autoload/rubycomplete.vim,v retrieving revision 1.28 diff -u -r1.28 rubycomplete.vim --- autoload/rubycomplete.vim 7 May 2006 21:04:09 -0000 1.28 +++ autoload/rubycomplete.vim 10 May 2006 06:54:20 -0000 @@ -26,14 +26,6 @@ endif " }}} requirement checks -if !exists("g:rubycomplete_rails") - let g:rubycomplete_rails = 0 -endif - -if !exists("g:rubycomplete_classes_in_global") - let g:rubycomplete_classes_in_global = 0 -endif - " {{{ vim-side support functions function! s:GetBufferRubyModule(name) let [snum,enum] = s:GetBufferRubyEntity(a:name, "module") @@ -90,7 +82,7 @@ return vtp endif call setpos('.',pos) - if g:rubycomplete_rails == 1 && s:rubycomplete_rails_loaded == 1 + if exists("g:rubycomplete_rails") && s:rubycomplete_rails_loaded == 1 let ctors = '\(now\|new\|open\|get_instance\|find\|create\)' else let ctors = '\(now\|new\|open\|get_instance\)' @@ -255,7 +247,7 @@ def get_buffer_classes() # this will be a little expensive. - allow_aggressive_load = VIM::evaluate('g:rubycomplete_classes_in_global') + allow_aggressive_load = VIM::evaluate('exists("g:rubycomplete_classes_in_global")') return [] if allow_aggressive_load != '1' buf = VIM::Buffer.current @@ -273,7 +265,7 @@ end def load_rails() - allow_rails = VIM::evaluate('g:rubycomplete_rails') + allow_rails = VIM::evaluate('exists("g:rubycomplete_rails")') return if allow_rails != '1' buf_path = VIM::evaluate('expand("%:p")') @@ -309,7 +301,7 @@ end def get_rails_helpers - allow_rails = VIM::evaluate('g:rubycomplete_rails') + allow_rails = VIM::evaluate('exists("g:rubycomplete_rails")') rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded') return [] if allow_rails != '1' || rails_loaded != '1' return RailsWords From gsinclair at gmail.com Thu May 11 03:37:01 2006 From: gsinclair at gmail.com (Gavin Sinclair) Date: Thu, 11 May 2006 17:37:01 +1000 Subject: PATCH: highlight comment blocks In-Reply-To: <20060509114928.GF3411@localhost.localdomain> References: <20060509114928.GF3411@localhost.localdomain> Message-ID: On 5/9/06, Doug Kearns wrote: > This enables folding of multiline comment blocks and is enabled by > default. It can be disabled by defining the ruby_no_comment_fold > variable. > > I'm going to have a look at simplifying the syntax based folding. It > seems to me that it might be best to reduce it to simply folding > module/class/method definitions, comment blocks, and __END__ data > blocks. > > Would anyone object to longer having the rest folded? If so, that too > could be configurable. ;-) > > Any thoughts? I don't use folding much, but I like the word "simplify" and variations thereof :) I also think that in Ruby, a little folding is better than a lot. Most loops, etc. are only a few lines long, so it would be a pain to unfold them. So I like the gist of what you're doing, without being able to comment on specifics. Gavin BTW, multiline comments should only be folded if they have at least, say, 4 lines? Just a hunch. From gsinclair at gmail.com Thu May 11 03:38:24 2006 From: gsinclair at gmail.com (Gavin Sinclair) Date: Thu, 11 May 2006 17:38:24 +1000 Subject: PATCH: highlight operators In-Reply-To: <20060508143428.GE3411@localhost.localdomain> References: <20060508143428.GE3411@localhost.localdomain> Message-ID: On 5/9/06, Doug Kearns wrote: > For those of you who've long had a burning desire for operator > highlighting, here's an initial stab at it. It's disabled by default - > define "ruby_operators" if you're interested. > > What? No?...me neither. Look, it's a rainbow! > Too much time on your hands...? I haven't configured _any_ syntax highlighting before, but I'm curious to see what this one looks like :) Gavin From dougkearns at gmail.com Thu May 11 03:51:01 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Thu, 11 May 2006 17:51:01 +1000 Subject: PATCH: highlight operators In-Reply-To: References: <20060508143428.GE3411@localhost.localdomain> Message-ID: <20060511075100.GA4343@localhost.localdomain> On Thu, May 11, 2006 at 05:38:24PM +1000, Gavin Sinclair wrote: > On 5/9/06, Doug Kearns wrote: > > For those of you who've long had a burning desire for operator > > highlighting, here's an initial stab at it. It's disabled by default - > > define "ruby_operators" if you're interested. > > > > What? No?...me neither. Look, it's a rainbow! > > > > Too much time on your hands...? 'Feature' request...believe it or not. We can't have disgruntled users can we? ;-) Regards, Doug From dougkearns at gmail.com Thu May 11 03:54:26 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Thu, 11 May 2006 17:54:26 +1000 Subject: PATCH: highlight comment blocks In-Reply-To: References: <20060509114928.GF3411@localhost.localdomain> Message-ID: <20060511075426.GB4343@localhost.localdomain> On Thu, May 11, 2006 at 05:37:01PM +1000, Gavin Sinclair wrote: > I also think that in Ruby, a little folding is better than a lot. > Most loops, etc. are only a few lines long, so it would be a pain to > unfold them. Well there seem to be some folding 'fiends' out there that actually want more, not less, by default. > So I like the gist of what you're doing, without being able to comment > on specifics. > > Gavin > > BTW, multiline comments should only be folded if they have at least, > say, 4 lines? Just a hunch. Yes. I was thinking three lines but I'm not sure... Oooh, more options? Regards, Doug From segfault at hasno.info Thu May 25 18:46:00 2006 From: segfault at hasno.info (Mark Guzman) Date: Thu, 25 May 2006 18:46:00 -0400 Subject: completion Message-ID: <447633A8.9080503@hasno.info> Ok, So I've updated cvs with a version of rubycomplete that seems to support rails 1.0 and 1.1. In addition it adds support for columns in rails and adds the type identifier to suggested matches. Give it a shot if you have from free time. --mark -- sic transit gloria et adulescentia blog | http://blog.hasno.info/blog wiki | http://wiki.hasno.info From dougkearns at gmail.com Fri May 26 07:37:58 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Fri, 26 May 2006 21:37:58 +1000 Subject: completion In-Reply-To: <447633A8.9080503@hasno.info> References: <447633A8.9080503@hasno.info> Message-ID: <20060526113758.GA23014@localhost.localdomain> On Thu, May 25, 2006 at 06:46:00PM -0400, Mark Guzman wrote: > Ok, > So I've updated cvs with a version of rubycomplete that seems to > support rails 1.0 and 1.1. In addition it adds support for columns in > rails and adds the type identifier to suggested matches. > Give it a shot if you have from free time. - Should methods have an m (member of struct or class) or f (function or method) identifier? - Should constants like RUBY_PLATFORM use the d (#define or macro) identifier rather than t (typedef)? Regards, Doug