From tilman at code-monkey.de Mon Jan 23 14:09:57 2006 From: tilman at code-monkey.de (Tilman Sauerbeck) Date: Mon, 23 Jan 2006 20:09:57 +0100 Subject: [BUG] Broken indentation Message-ID: <20060123190956.GA8391@code-monkey.de> Hi, I noticed vim-ruby fails to indent the following code snippet correctly. Line numbers were added by me of course ;) 1 [ 2 [:foo, :bar] 3 ].each do |(one,two)| 4 blah 5 blah2 6 end While line 5 is indented correctly, line 6 isn't. If i replace line 4 with an empty string (""), the following line is indented correctly. If line 2 is removed, line 4 (resp now 3) isn't indented correctly anymore either (it will be moved to column zero). This bug is present in cvs HEAD. Thanks, Tilman -- GnuPG key available at http://code-monkey.de/files/tsauerbeck-public-key.asc -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/vim-ruby-devel/attachments/20060123/a1d5aebe/attachment.bin From thomas at edulinux.homeunix.org Thu Feb 9 19:21:57 2006 From: thomas at edulinux.homeunix.org (Thomas Adam) Date: Fri, 10 Feb 2006 00:21:57 +0000 Subject: Addition of some new files Message-ID: <20060210002157.GA11078@edulinux.homeunix.org> Hello all, I'm impressed with vim-ruby -- although I thought it would be nice to include some addition files, especially the ones on rubygarden.org. What I am proposing, isn't my own work. Essentially they're vim files that I have seen on the web, although all of them are under the GPL. I have made some modifications to some of the files. From what I can currently tell, vim-ruby has indent, syntax and compiler support, with ri support as well. This is great, and it does exactly what I would have expected. However the files I'd like to see distributed with it are the ones found in here: http://edulinux.homeunix.org/~n6tadam/vim-ruby/ block_eval is really useful in that it converts a block of code, hence: [1,2,3].each {|a| p a} into: [1,2,3] do |a| p a end ... and vice-versa, via the mapping ":B". vim_folding does something similar for method definitions, via ":R" (and :zi/:za). ruby_structure -- this was from rubygarden -- essentially it allows one to use Shift + Enter to ident and complete various code blocks. I can't tell you how useful this has been in the past. ruby_xml -- probably my most favourite -- in-line evaluation. Perhaps better than irb in many ways. I have the various functions of it bound to F5, F6 and F7 -- this was shamelessly stolen from rubygarden.org again. You may consider this overkill -- I apologise in advance. I certainly do not wish to tread on anyone's toes as it were. I was also thinking of writing a simple menu vim file for gvim -- so that you could access the various functions of these scripts. Might make it more appealing -- and I already have a something like it which I use for my own purposes. I am more than happy to help out however I can, of course. -- Thomas Adam -- I've been too honest with myself, I should have lied like everybody else. From gsinclair at gmail.com Wed Feb 15 02:12:06 2006 From: gsinclair at gmail.com (Gavin Sinclair) Date: Wed, 15 Feb 2006 18:12:06 +1100 Subject: Addition of some new files In-Reply-To: <20060210002157.GA11078@edulinux.homeunix.org> References: <20060210002157.GA11078@edulinux.homeunix.org> Message-ID: Hi Thomas, Thanks for the contribution. It's not overkill and you're not treading on anyone's toes. I'd love to see all of those things in the vim-ruby distribution. One issue is organising all those features: would they be switched on by default? I don't think so, because we don't want to trash people's existing settings, like key-bindings. So then, how do we make it really easy to enable the features? And I mean _really_ easy. Also to do with organisation is a good set of keybindings that covers everything, making them kind of predictable. Perhaps it would be nice to have one interface command, like :ruby_vim which takes arguments like the following: :ruby_vim convert-block :ruby_vim fold-on-method ... :ruby_vim list-commands :ruby_vim help fold-on-method Now it's me who's getting into overkill. But anyway, this sort of idea could be the basis for making it easy to manage all the tricks that are implemented. Of course, then you have key bindings to each of those commands, like nunmap :ruby-vim fold-on-method as a completely made-up example. The point is that it would be easy for someone to see what the key bindings were, and change them if they wanted. The next issue is documentation. Of course, the great benefit of incorporating this stuff into ruby-vim is that it can be documented all in one place, with consistent layout and quality, etc. The downside is that someone has to do it. So if you want to follow up on these ideas, Thomas, or invent a management and documentation approach of your own, I'd love to see it. It would be included in an instant -- providing there's no serious dissent from other list members. One last thing, Thomas. Are you aware of the snippets implementation for Vim being worked on by Jeff Rose? It's very powerful, very cool, and another thing that will hopefully be worked into the distribution before long. Cheers, Gavin On 2/10/06, Thomas Adam wrote: > Hello all, > > I'm impressed with vim-ruby -- although I thought it would be nice to > include some addition files, especially the ones on rubygarden.org. > What I am proposing, isn't my own work. Essentially they're vim files > that I have seen on the web, although all of them are under the GPL. I > have made some modifications to some of the files. > > From what I can currently tell, vim-ruby has indent, syntax and > compiler support, with ri support as well. This is great, and it does > exactly what I would have expected. However the files I'd like to see > distributed with it are the ones found in here: > > http://edulinux.homeunix.org/~n6tadam/vim-ruby/ > > block_eval is really useful in that it converts a block of code, hence: > > [1,2,3].each {|a| p a} > > into: > > [1,2,3] do |a| > p a > end > > ... and vice-versa, via the mapping ":B". > > vim_folding does something similar for method definitions, via ":R" > (and :zi/:za). > > ruby_structure -- this was from rubygarden -- essentially it allows > one to use Shift + Enter to ident and complete various code blocks. I > can't tell you how useful this has been in the past. > > ruby_xml -- probably my most favourite -- in-line evaluation. Perhaps > better than irb in many ways. I have the various functions of it > bound to F5, F6 and F7 -- this was shamelessly stolen from > rubygarden.org again. > > You may consider this overkill -- I apologise in advance. I certainly > do not wish to tread on anyone's toes as it were. I was also thinking > of writing a simple menu vim file for gvim -- so that you could access > the various functions of these scripts. Might make it more appealing > -- and I already have a something like it which I use for my own > purposes. > > I am more than happy to help out however I can, of course. > > -- Thomas Adam > > -- > I've been too honest with myself, I should have lied like everybody else. > _______________________________________________ > vim-ruby-devel mailing list > vim-ruby-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/vim-ruby-devel > From rosejn at gmail.com Wed Feb 15 07:24:24 2006 From: rosejn at gmail.com (Jeff Rose) Date: Wed, 15 Feb 2006 13:24:24 +0100 Subject: snippetMagic Message-ID: <43F31D78.4080102@gmail.com> I was just heckling Gavin with questions while trying to work the kinks out of these snippets, but I should be posting to the list anyway... First, I'm trying to get the indentation to work correctly. Is there by any chance a way to query for where the current line should be indented to? The language indenting stuff in vim has to know this, but I'm not sure how to use it. I guess I could even just do "==" on each line before and after writing text, but I'm not sure if that is correct either. Any advice you have would be great. Second, what do you think is the best way for selecting the active snippet packages? Currently it just uses the filetype variable, but there is a package for rails, for example, which that won't work for. Any pointers on making menus or easy to use picklists or something? This is the kind of stuff that a good ruby binding for vim would have included so we can throw together functional plugins without spending time on boilerplate stuff...(Documentation could probably be automated too. Maybe an rdoc to vim documentation generator or something?) I tried to ask around about who is working on the binding and no one responded, including the author. If we were to work on the binding in this project do you think they would accept additions and/or changes? Last, do you have any ideas on a minimally intrusive way to tell the user that their cursor is currently in place to run a snippet? In TextMate a little dot comes up at the bottom, which is nice because it lets you learn about new snippets as you code. (So you type "foo.each[cursor-here]" and a star shows up in the status bar or something, which tells you that if you hit tab a snippet will be produced.) I second Thomas's suggestions as well. Mauricio Fernandez folding and block conversion scripts are great, and the others look helpful. It would be ideal if we could create a list of features, and then inside vim select a feature from the list, hit enter, and then press the key combination you want to bind to it. Basically how it's done in video games... -Jeff From thomas at edulinux.homeunix.org Wed Feb 15 07:39:28 2006 From: thomas at edulinux.homeunix.org (Thomas Adam) Date: Wed, 15 Feb 2006 12:39:28 +0000 Subject: Addition of some new files In-Reply-To: References: <20060210002157.GA11078@edulinux.homeunix.org> Message-ID: <20060215123928.GX11078@edulinux.homeunix.org> Gavin, et al. -- On Wed, Feb 15, 2006 at 06:12:06PM +1100, Gavin Sinclair wrote: > Hi Thomas, Hello. > Thanks for the contribution. It's not overkill and you're not treading > on anyone's toes. I'd love to see all of those things in the vim-ruby > distribution. Hehe. OK. :) > One issue is organising all those features: would they be switched on > by default? I don't think so, because we don't want to trash people's > existing settings, like key-bindings. So then, how do we make it > really easy to enable the features? And I mean _really_ easy. Well, this is something I have given a lot of thought to. I whole-heartedly agree that we cannot just turn on these features by default, since that would effectively break existing methods of working with people that: a) Use different folding techniques, and b) Have a different set of key-bindings. The only way I can see this being any use (such that things don't break with existing settings) is having some sort of wrapper script, akin to vim-ruby-install.rb. I know this is a real kludge, but it would effectively allow the explicit denial or customisations of certain features. But then there are issues with it --- the assumption here is that people are already using Vim as a default editor. It might be some are not -- at least not to the extent such that they'd _know_ the differences between the various different folding techniques, for instance. It's a tricky one, alright. I wouldn't want them to be 'on' by default. I suppose you could have some option of "plugins" made available. I assume this is what you were getting at with your suggestion below with: :ruby-vim convert-block command? (That would probably have to start with a capital letter, as it's a potential user-command, of course.) That would at least allow for optional pieces of functionality to be loaded, and presumably wouldn't break too much by way of existing settings a particular #{user} might have. > Also to do with organisation is a good set of keybindings that covers > everything, making them kind of predictable. Perhaps it would be nice > to have one interface command, like :ruby_vim which takes arguments > like the following: > > :ruby_vim convert-block :ruby_vim fold-on-method ... :ruby_vim > list-commands :ruby_vim help fold-on-method I agree. There's two options that I can see we have here: 1. We don't supply any default key-bindings at all, in preference of a #{user} selecting them for his/her self to maintain non-breakage. or: 2. We just provide a default set of key-bindings that would allow certain functionality to be present -- and hence load *all* the plugins to suit a necessary environment. Quite honestly, I know that (2) is used a lot in EMACS. I've not used it -- but I know that its plugins provides various different key-bindings irrespective of them already being defined. > nunmap :ruby-vim fold-on-method > > as a completely made-up example. The point is that it would be easy > for someone to see what the key bindings were, and change them if they > wanted. Absolutely. Maybe having an interface such as this would be a good thing -- it would certainly make maintainability quite easy, no? And it would mean that the potential user probably doesn't have to relearn different :commands, just to satisfy different plugins because they each have their own 'interface', as it were. > The next issue is documentation. Of course, the great benefit of > incorporating this stuff into ruby-vim is that it can be documented > all in one place, with consistent layout and quality, etc. The > downside is that someone has to do it. But to me, that's part and parcel of any proposal. I am *more* than willing to document the necessary features/changes so that things are made clear to anyone who might need help with a certain feature, etc. > So if you want to follow up on these ideas, Thomas, or invent a > management and documentation approach of your own, I'd love to see it. > It would be included in an instant -- providing there's no serious > dissent from other list members. This is something I'd like input on from others -- perhaps we can flesh these ideas out a bit more? I'm more than happy to devote time to design and/or documenting whatever is necessary. > One last thing, Thomas. Are you aware of the snippets implementation > for Vim being worked on by Jeff Rose? It's very powerful, very cool, > and another thing that will hopefully be worked into the distribution > before long. I am not aware of it, although as I type this I see an email from Jeff that looks like it might well mention 'snippets'. Expect a follow-up email to that thread. :) Kindly, -- Thomas Adam -- I've been too honest with myself, I should have lied like everybody else. From thomas at edulinux.homeunix.org Wed Feb 15 08:06:39 2006 From: thomas at edulinux.homeunix.org (Thomas Adam) Date: Wed, 15 Feb 2006 13:06:39 +0000 Subject: snippetMagic In-Reply-To: <43F31D78.4080102@gmail.com> References: <43F31D78.4080102@gmail.com> Message-ID: <20060215130639.GY11078@edulinux.homeunix.org> Jeff, On Wed, Feb 15, 2006 at 01:24:24PM +0100, Jeff Rose wrote: I have to ask Jeff (whether it's just me being naive I couldn't say) -- but where would I find your snippets implemetation. What is it, even? :) > First, I'm trying to get the indentation to work correctly. Is there > by any chance a way to query for where the current line should be > indented to? The language indenting stuff in vim has to know this, > but I'm not sure how to use it. I guess I could even just do "==" on > each line before and after writing text, but I'm not sure if that is > correct either. Any advice you have would be great. Well, the indenting stuff works by vim evaluating the given syntax within the specified filetype. When you say "current line" -- I assume you mean the line which has the cursor on it? Paradoxically if that's the case, the indentation ought to have already taken place. But you're right, == is certainly one way of doing it. > Second, what do you think is the best way for selecting the active > snippet packages? Currently it just uses the filetype variable, but > there is a package for rails, for example, which that won't work for. > Any pointers on making menus or easy to use picklists or something? Hmm. Filetypes are all well and good, but there are of course instances when this not desirable. I suppose what you could do in that case is get Vim to read modelines, but the issue here is that Vim might not be setup to use them, or the entry for the necessary modeline is not present within the file beforehand. I had this issue when I was looking at FVWM syntax. The way I got around it (essentially distinguishing between version 1 and version 2) was to set a buffer which then toggled between the two. Ultimately overkill, of course. > This is the kind of stuff that a good ruby binding for vim would have > included so we can throw together functional plugins without spending > time on boilerplate stuff...(Documentation could probably be automated > too. Maybe an rdoc to vim documentation generator or something?) I > tried to ask around about who is working on the binding and no one > responded, including the author. If we were to work on the binding in > this project do you think they would accept additions and/or changes? I would have thought so, yes. > Last, do you have any ideas on a minimally intrusive way to tell > the user that their cursor is currently in place to run a snippet? > In TextMate a little dot comes up at the bottom, which is nice > because it lets you learn about new snippets as you code. (So you > type "foo.each[cursor-here]" and a star shows up in the status bar > or something, which tells you that if you hit tab a snippet will be > produced.) Interesting idea. I have never used TextMate. I am not sure how you would go about doing this in Vim. > I second Thomas's suggestions as well. Mauricio Fernandez folding and > block conversion scripts are great, and the others look helpful. It > would be ideal if we could create a list of features, and then inside > vim select a feature from the list, hit enter, and then press the key > combination you want to bind to it. Basically how it's done in video > games... Video... what? :) /me cuddles moon-buggy -- Thomas Adam -- I've been too honest with myself, I should have lied like everybody else. From rosejn at gmail.com Tue Feb 28 08:02:32 2006 From: rosejn at gmail.com (Jeff Rose) Date: Tue, 28 Feb 2006 14:02:32 +0100 Subject: new SnippetMagic plugin Message-ID: <440449E8.6070505@gmail.com> Hey everyone, I've got a new version of the SnippetMagic plugin available for download: http://blog.rosejn.net/articles/2006/02/28/snippetmagic-0-02 This time it's using YAML for the snippet definition storage, and a vim menu is added that lets you select the active package. (It will soon correctly support multiple active packages.) The indentation is now done according to your vim settings (tabs & spaces are a mess), and I have fixed some of the cursor placement, highlighting and movement bugs. The url above has more info... Please let me know what you think and where you have bugs. Once it's somewhat stable I'd like to step back for a refactoring so that some of this code can be put into a ruby library that should simplify writing vim plugins in the future. -Jeff From alexandru at globalterrasoft.ro Wed Mar 1 04:45:46 2006 From: alexandru at globalterrasoft.ro (Alexandru E. Ungur) Date: Wed, 1 Mar 2006 11:45:46 +0200 Subject: new SnippetMagic plugin In-Reply-To: <440449E8.6070505@gmail.com> References: <440449E8.6070505@gmail.com> Message-ID: <20060301094538.GA25581@globalterrasoft.ro> >>> sender: "Jeff Rose" date: "Tue, Feb 28, 2006 at 02:02:32PM +0100" << Hey everyone, > I've got a new version of the SnippetMagic plugin available for download: > > http://blog.rosejn.net/articles/2006/02/28/snippetmagic-0-02 Hi, I'd very much like to test this plugin. I already have it installed but I'm not sure how to use/test it... I tried opening this link: http://blog.rosejn.net/admin/content/show/32 found at the above mentioned link which should point to a more detailed description, but it doesn't work (asks for login?). Have a nice day everyone, Alex From rosejn at gmail.com Wed Mar 1 06:42:47 2006 From: rosejn at gmail.com (Jeff Rose) Date: Wed, 01 Mar 2006 12:42:47 +0100 Subject: new SnippetMagic plugin In-Reply-To: <20060301094538.GA25581@globalterrasoft.ro> References: <440449E8.6070505@gmail.com> <20060301094538.GA25581@globalterrasoft.ro> Message-ID: <440588B7.8060701@gmail.com> Thanks for catching that. I updated the link to the correct one: http://blog.rosejn.net/articles/2005/12/09/snippets-0-01 If you are using a graphical vim you should be able to select "ruby" from the SnippetMagic menu, and then when you hit tab after any of the defined tab-triggers it will print out a snippet. You can then tab through the parts of the snippet to edit the pieces. Here is a capture of the last version (working on new ones): http://code.rosejn.net/images/snippetMagic.gif Let me know if you run into problems, Jeff Alexandru E. Ungur wrote: >>>> sender: "Jeff Rose" date: "Tue, Feb 28, 2006 at 02:02:32PM +0100" <<> Hey everyone, >> I've got a new version of the SnippetMagic plugin available for download: >> >> http://blog.rosejn.net/articles/2006/02/28/snippetmagic-0-02 > Hi, > > I'd very much like to test this plugin. I already have it installed but > I'm not sure how to use/test it... > I tried opening this link: http://blog.rosejn.net/admin/content/show/32 > found at the above mentioned link which should point to a more detailed > description, but it doesn't work (asks for login?). > > Have a nice day everyone, > Alex > _______________________________________________ > vim-ruby-devel mailing list > vim-ruby-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/vim-ruby-devel > From alexandru at globalterrasoft.ro Wed Mar 1 09:58:55 2006 From: alexandru at globalterrasoft.ro (Alexandru E. Ungur) Date: Wed, 1 Mar 2006 16:58:55 +0200 Subject: new SnippetMagic plugin In-Reply-To: <440588B7.8060701@gmail.com> References: <440449E8.6070505@gmail.com> <20060301094538.GA25581@globalterrasoft.ro> <440588B7.8060701@gmail.com> Message-ID: <20060301145854.GA24020@globalterrasoft.ro> >>> sender: "Jeff Rose" date: "Wed, Mar 01, 2006 at 12:42:47PM +0100" << Thanks for catching that. I updated the link to the correct one: > http://blog.rosejn.net/articles/2005/12/09/snippets-0-01 > > If you are using a graphical vim you should be able to select "ruby" > from the SnippetMagic menu, and then when you hit tab after any of the > defined tab-triggers it will print out a snippet. You can then tab > through the parts of the snippet to edit the pieces. Here is a capture > of the last version (working on new ones): > > http://code.rosejn.net/images/snippetMagic.gif Thank you very much, now the plugin makes much more sense to me :) I use the console vim, and select the ruby with :emenu SnippetMagic.ruby Everything works as expected, except that if I have the plugin installed the arrow keys are inserting A/B/C or D everytime I touch them (they do move however). If I delete the plugin files, everything comes back to normal. BTW, I'm not sure if this feedback is appropriate here on the list or not, so if it's not, I appologise. Alex From rosejn at gmail.com Wed Mar 1 10:38:08 2006 From: rosejn at gmail.com (Jeff Rose) Date: Wed, 01 Mar 2006 16:38:08 +0100 Subject: new SnippetMagic plugin In-Reply-To: <20060301145854.GA24020@globalterrasoft.ro> References: <440449E8.6070505@gmail.com> <20060301094538.GA25581@globalterrasoft.ro> <440588B7.8060701@gmail.com> <20060301145854.GA24020@globalterrasoft.ro> Message-ID: <4405BFE0.9060201@gmail.com> Shoot. I never use the arrow keys so I forgot about this problem. Maybe someone on the list has an idea what's causing the abc's to get printed when the arrows are hit in insert mode. (up=A, down=B, right=C, left=D) You can look at the bottom of snippetMagic.vim if you have the plugin, or this is an example of what I'm doing: ------------------------------- " Remap the down key " " NOTE: This nullifies active snippets. " function! SnippetMagicDown() if g:snippet_active call SnippetMagicFinish() endif return "\" endfunction imap normal :call SnippetMagicDown() vmap :call SnippetMagicDown() ------------------------------- I just included a patch and posted a new version that should fix some issues with snippets that included periods and dollar signs. Thanks for the help, Jeff Alexandru E. Ungur wrote: >>>> sender: "Jeff Rose" date: "Wed, Mar 01, 2006 at 12:42:47PM +0100" <<> Thanks for catching that. I updated the link to the correct one: >> http://blog.rosejn.net/articles/2005/12/09/snippets-0-01 >> >> If you are using a graphical vim you should be able to select "ruby" >> from the SnippetMagic menu, and then when you hit tab after any of the >> defined tab-triggers it will print out a snippet. You can then tab >> through the parts of the snippet to edit the pieces. Here is a capture >> of the last version (working on new ones): >> >> http://code.rosejn.net/images/snippetMagic.gif > Thank you very much, now the plugin makes much more sense to me :) > > I use the console vim, and select the ruby with > :emenu SnippetMagic.ruby > > Everything works as expected, except that if I have the plugin installed > the arrow keys are inserting A/B/C or D everytime I touch them (they > do move however). If I delete the plugin files, everything comes back to > normal. > > BTW, I'm not sure if this feedback is appropriate here on the list > or not, so if it's not, I appologise. > > > Alex > _______________________________________________ > vim-ruby-devel mailing list > vim-ruby-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/vim-ruby-devel > From sroberts at uniserve.com Sat Mar 25 17:37:34 2006 From: sroberts at uniserve.com (Sam Roberts) Date: Sat, 25 Mar 2006 14:37:34 -0800 Subject: had trouble getting matchit support working Message-ID: <20060325223734.GA664@ensemble.local> I think its working now, but it took a little while, about 10 times longer than getting vim-ruby from cvs and running the install script. I didn't find the FAQ very clear, can I suggest: See |matchit-install| for instructions on installing "matchit", which will allow you to use |%| to bounce between Ruby keywords (class, def, while, ...) -and their respective "end" keywords. +and their respective "end" keywords. After installing "matchit", you need +to provide support for it to work with Ruby. You may find this file to work +when copied to ~/.vim/ftplugin/ruby_matchit.vim: + + http://bike-nomad.com/vim/ruby.vim + +I had less success with: + + http://rubystuff.org/vim/ruby_matchit.vim The rubystuff.org file dumped errors to my console when I used "%". The bike-nomad one seems to define a number of things unrelated to matchit. I'd sure be happy if the support was merged with vim-ruby for the next release. Thanks, Sam From dougkearns at gmail.com Sun Mar 26 04:34:39 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Sun, 26 Mar 2006 20:34:39 +1100 Subject: had trouble getting matchit support working In-Reply-To: <20060325223734.GA664@ensemble.local> References: <20060325223734.GA664@ensemble.local> Message-ID: <20060326093439.GB3017@localhost.localdomain> G'day Sam, On Sat, Mar 25, 2006 at 02:37:34PM -0800, Sam Roberts wrote: > I think its working now, but it took a little while, about 10 times > longer than getting vim-ruby from cvs and running the install script. > I'd sure be happy if the support was merged with vim-ruby for the next > release. This was merged several years ago so all you should need to do is configure the general matchit plugin. I gather this didn't work? Regards, Doug From dougkearns at gmail.com Sun Mar 26 04:44:52 2006 From: dougkearns at gmail.com (Doug Kearns) Date: Sun, 26 Mar 2006 20:44:52 +1100 Subject: Vim 7 gone beta Message-ID: <20060326094452.GD3017@localhost.localdomain> Hello all, I was just wondering if anyone had Omni completion doing anything useful yet in case we should be including something in the next release of Vim? Wishful thinking... ;-) Thanks, Doug From sroberts at uniserve.com Sun Mar 26 05:33:18 2006 From: sroberts at uniserve.com (Sam Roberts) Date: Sun, 26 Mar 2006 02:33:18 -0800 Subject: had trouble getting matchit support working In-Reply-To: <20060326093439.GB3017@localhost.localdomain> References: <20060325223734.GA664@ensemble.local> <20060326093439.GB3017@localhost.localdomain> Message-ID: <20060326103318.GA2266@ensemble.local> Quoting dougkearns at gmail.com, on Sun, Mar 26, 2006 at 08:34:39PM +1100: > > I'd sure be happy if the support was merged with vim-ruby for the next > > release. > > This was merged several years ago so all you should need to do is > configure the general matchit plugin. I gather this didn't work? Hm, well, yes, I guess it does. Quite nicely. Thanks! I guess I started down the wrong path when I installed with vim-ruby-config. I looked at matchit-install, but it lead to a section called "Adding a help file", which seemed wholly irrelevant to me, though now I understand why the FAQ points there. When I read the FAQ, and it said matching should work, I looked at the wiki and tried to follow its advice, and from there I was completely off track... From sroberts at uniserve.com Sun Mar 26 18:29:50 2006 From: sroberts at uniserve.com (Sam Roberts) Date: Sun, 26 Mar 2006 15:29:50 -0800 Subject: I've found some ruby runtime errors jump me to a non-existent file Message-ID: <20060326232950.GA604@ensemble.local> The latest vim-ruby is working well for me, good work you all. One persistent problem. Mostly, errors take me to the source, but occaisonally I get a blank buffer, with what appears to be the name of the file that has the error in the mode line. It depends on the type of error, but I just reproduced it. The error is a yield in a method that wasn't passed a block, and the output, shown from a terminal: % make ruby -w -I lib test_vcard.rb -n test_modify Loaded suite test_vcard Started E Finished in 0.007522 seconds. 1) Error: test_modify(TestVcard): LocalJumpError: no block given ./lib/vpim/maker/vcard.rb:92:in `add_name' test_vcard.rb:687:in `test_modify' ./lib/vpim/maker/vcard.rb:49:in `make' ./lib/vpim/maker/vcard.rb:37:in `make2' test_vcard.rb:686:in `test_modify' 1 tests, 1 assertions, 0 failures, 1 errors make: *** [do] Error 1 When I run the unit tests from vim (with :make), then the error file name is " ./lib/vpim/maker/vcard.rb", it includes the leading white space! Thats a valid filename of course, its just not the name of the file with the error. vim doesn't find the directory " .", so it can't open the file, and I'm left staring puzzledly at a blank buffer. Cheers, Sam In case this is a problem with my local install: My ~/.vim after installing vim-ruby, I didn't change any of these: /Users/sam/.vim/compiler/eruby.vim /Users/sam/.vim/compiler/ruby.vim /Users/sam/.vim/compiler/rubyunit.vim /Users/sam/.vim/doc/matchit.txt /Users/sam/.vim/doc/tags /Users/sam/.vim/foo.rb /Users/sam/.vim/ftdetect/ruby.vim /Users/sam/.vim/ftplugin/eruby.vim /Users/sam/.vim/ftplugin/ruby.vim /Users/sam/.vim/indent/eruby.vim /Users/sam/.vim/indent/ruby.vim /Users/sam/.vim/plugin/matchit.vim /Users/sam/.vim/rubyunit.vim /Users/sam/.vim/syntax/eruby.vim /Users/sam/.vim/syntax/ruby.vim ---- my .vimrc ---- " ~/.vimrc " Existing files are overwritten. This is safe, because it's a slow-maturing " project, so new files are better than old ones. However, if you had edited the " files, you will have lost your changes. Better make your changes in, for " instance: " " ~/.vim/after/ftplugin/ruby.vim ~ " " This file will be loaded _after_ the regular config files are loaded, so your " customisations will definitely take effect. " See the Exuberant ctags mailing list, where Elliott Hughes (who wrote this) " posted a [patch] for this. His editor, [Edit], uses Exuberant ctags to show " a tree of classes and methods where what you're editing is highlighted, and " you can click elsewhere to jump to that method, so he needed better Ruby " support. " " It's not perfect (it doesn't use the real Ruby yacc parser), but it's pretty " good. filetype on filetype indent on filetype plugin on """ Whitespace set shiftwidth=2 set softtabstop=2 set tabstop=8 set expandtab set nowrap set autoindent set textwidth=0 """ History set nobackup set viminfo='20,\"50 set history=50 """ UI "set ignorecase " Do case insensitive matching set autowrite " Automatically save before commands like :next and :make set backspace=indent,eol,start " more powerful backspacing FIXME - does what? set incsearch " Incremental search set nohlsearch set ruler " show the cursor position all the time set showcmd " Show (partial) command in status line. set showmatch " Show matching brackets. set noeb set vb t_vb= " FIXME - does what? " compiler ruby " FIXME - I want the list when I do TAB, how do I do that? " Suffixes that get lower priority when doing tab completion for filenames. " These are files we are not likely to want to edit or read. set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc """ Colors " Configure these terminals to be color. if &term =~ "xterm-debian" || &term =~ "xterm-xfree86" || &term =~ "xterm" set t_Co=16 set t_Sf=[3%dm set t_Sb=[4%dm endif syntax on hi clear Identifier """ Miscellaneous " "set errorformat=%f:%l:\ %m,%Dgmake[%*\\d]:\ Entering\ directory\ `%f',%Dgmake[%*\\d]:\ Leaving\ directory\ `%f' " " " " let s:cpo_save = &cpo " set cpo-=C " " " setlocal errorformat=\%Etest%[%^\ ]%#(%[%^\ ]%#)\ [%f:%l]:, " " \%Z%m%\\%., " " \%C%m%\\%., " " \%-GLoaded%.%#, " " \%-GStarted%.%#, " " \%-G%[EF%.]%.%#, " " \%-GFinished\ in%.%#, " " \%-G\ %\\+%\\d%\\+)\ Failure:, " " \%-G\ %\\+%\\d%\\+)\ Error: " " let &cpo = s:cpo_save " unlet s:cpo_save From sroberts at uniserve.com Sun Mar 26 19:14:38 2006 From: sroberts at uniserve.com (Sam Roberts) Date: Sun, 26 Mar 2006 16:14:38 -0800 Subject: I've found some ruby runtime errors jump me to a non-existent file In-Reply-To: <20060326232950.GA604@ensemble.local> References: <20060326232950.GA604@ensemble.local> Message-ID: <20060327001437.GA742@ensemble.local> 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 Cheers, Sam