From vim-ruby-devel at tpope.info Fri Apr 20 14:29:10 2007 From: vim-ruby-devel at tpope.info (Tim Pope) Date: Fri, 20 Apr 2007 13:29:10 -0500 Subject: eRuby revisited Message-ID: <20070420182910.GV5710@tpope.us> After much thought, I've finally implemented the changes necessary to allow eRuby to be mixed with arbitrary filetypes. The syntax file, indent plugin, and ftplugin all integrate their own settings with settings from the ruby filetype and other filetype. The system works surprisingly well, so I have decided to hold off on a separate "rhtml" filetype. The ftdetect file has also been updated to recognize a .erb extension. The other filetype (hereafter referred to as the subtype) is detected based on the current filename. The algorithm used is to look at the extension of the file, after stripping off an optional ".erb". For "foo.html.erb", the subtype would be html. A few extensions are mapped to other filetypes (rhtml to html for instance), but by and large this extension is used as is. If no extension is present after removing ".erb", the default is html. It would of course be nice to hook the remaining filename into the much smarter filetype detection system provided by Vim but this doesn't appear feasible. For more unusual contructs like "foo.pl.erb", the nonexistant "pl" filetype will be used. This can be overridden by the user if so desired: autocmd BufNewFile,BufRead *.pl.erb let b:eruby_subtype='perl'|set ft=eruby Unfortunately, the resetting of the filetype is necessary unless this autocmd is defined before filetype detection is enabled. One final note about the filetype determination. The detection algorithm is duplicated in both the syntax file and ftplugin. This means two places to update, but the ftplugin needs it because it runs first, and the syntax file needs it because of the (typically uninformed) users who have enabled syntax highlighting but not filetype plugins. I didn't bother duplicating it in the indent plugin because it runs fast, and I figure most users enable at least one of the two others. Other than documentation, and perhaps a way to override the global default subtype, I consider the transition to the new system largely complete. Please let me know of any issues. Doug, my understanding is you don't do a lot with eRuby anyways, so I have listed myself as the maintainer of the other two eRuby files. Feel free to claim them back if you feel I'm encroaching on your turf. Cheers, Tim From patrick.schless at gmail.com Sun Apr 22 09:29:26 2007 From: patrick.schless at gmail.com (Patrick Schless) Date: Sun, 22 Apr 2007 08:29:26 -0500 Subject: indenting issue Message-ID: <4b5d0b760704220629v5e852aefx5b41a23a6e84e0c4@mail.gmail.com> I am getting incorrect indenting under a very specific condition. In a case statement, if the 'when' is testing against a string, and the next line starts a 'do' block, the contents of the 'do' block do not get indented. The error occurs for both the 'loop do' and 'do |foo|' forms. a = "b" case a when "a" loop do # indenting is now off by one end # Still off end # back to normal case a when "a" loop do # off by one even if there is an empty line above the 'do' end end case a when "a" puts a loop do # Indenting is ok if there is at least one non-empty, non-commented line above it end end From dougkearns at gmail.com Wed Apr 25 11:04:43 2007 From: dougkearns at gmail.com (Doug Kearns) Date: Thu, 26 Apr 2007 01:04:43 +1000 Subject: eRuby revisited In-Reply-To: <20070420182910.GV5710@tpope.us> References: <20070420182910.GV5710@tpope.us> Message-ID: <644fc65e0704250804g32e70eecvcc386de318975ed@mail.gmail.com> On 4/21/07, Tim Pope wrote: > After much thought, I've finally implemented the changes necessary to > allow eRuby to be mixed with arbitrary filetypes. The syntax file, > indent plugin, and ftplugin all integrate their own settings with > settings from the ruby filetype and other filetype. The system works > surprisingly well, so I have decided to hold off on a separate "rhtml" > filetype. A rare victory for purity over practicality? ;-) > Doug, my understanding is you don't do a lot with eRuby anyways, so I > have listed myself as the maintainer of the other two eRuby files. > Feel free to claim them back if you feel I'm encroaching on your turf. All yours mate! Thanks. Regards, Doug From vim-ruby-devel at tpope.info Sun May 6 13:01:19 2007 From: vim-ruby-devel at tpope.info (Tim Pope) Date: Sun, 6 May 2007 12:01:19 -0500 Subject: Imminent Vim 7.1 release, can we make it? Message-ID: <20070506170119.GG18708@tpope.us> Hi all. The first beta of Vim 7.1 is out, and apparently Bram intends on doing the release in the next few days. Doug, any chance of us doing a release in the next 24 hours or so, in time to make it into the next Vim release? I'm going to start working on the NEWS file now. Let me know if you need any additional help; I'd really like to get the new eRuby stuff into 7.1. If/when you email Bram, don't forget to let him know to add *.erb to the ftdetect script. Let me take this moment to justify a couple of recent changes I made. The ruby ftplugin now sports 8 new maps: [[, ]], [], ][, [m, ]m, [M, and ]M. The first 4 bounce around class and module declarations, and the second four around method declarations. My rationale for their inclusion is that they cover up sequences that are quite worthless in Ruby with mappings that mirror their original intent. This is not unprecedented: Bram himself does it in ftplugin/vim.vim. I'm generally against mappings in ftplugins but I think these are both helpful and benign. If anyone disagrees, by all means strip them out until we can discuss them more. I don't want them to hold up the release. Cheers, Tim From vim-ruby-devel at tpope.info Sun May 6 13:57:00 2007 From: vim-ruby-devel at tpope.info (Tim Pope) Date: Sun, 6 May 2007 12:57:00 -0500 Subject: Imminent Vim 7.1 release, can we make it? In-Reply-To: <20070506170119.GG18708@tpope.us> References: <20070506170119.GG18708@tpope.us> Message-ID: <20070506175700.GH18708@tpope.us> On Sun, May 06, 2007 at 12:01:19PM -0500, Tim Pope wrote: > The first beta of Vim 7.1 is out, and apparently Bram intends on doing > the release in the next few days. Doug, any chance of us doing a > release in the next 24 hours or so, in time to make it into the next > Vim release? I'm going to start working on the NEWS file now. Let me NEWS is done. Cheers, Tim From dougkearns at gmail.com Sun May 6 21:42:00 2007 From: dougkearns at gmail.com (Doug Kearns) Date: Mon, 7 May 2007 11:42:00 +1000 Subject: Imminent Vim 7.1 release, can we make it? In-Reply-To: <20070506170119.GG18708@tpope.us> References: <20070506170119.GG18708@tpope.us> Message-ID: <644fc65e0705061842h7b678f93x44598fa5d5fb7cd3@mail.gmail.com> On 5/7/07, Tim Pope wrote: > Hi all. > > The first beta of Vim 7.1 is out, and apparently Bram intends on doing > the release in the next few days. Bram and his two day betas, eh? ;-) > Doug, any chance of us doing a > release in the next 24 hours or so, in time to make it into the next > Vim release? I'm going to start working on the NEWS file now. Let me > know if you need any additional help; I'd really like to get the new > eRuby stuff into 7.1. If/when you email Bram, don't forget to let him > know to add *.erb to the ftdetect script. That should be fine. Have you been running from CVS since the last release? > Let me take this moment to justify a couple of recent changes I made. > The ruby ftplugin now sports 8 new maps: [[, ]], [], ][, [m, ]m, [M, > and ]M. The first 4 bounce around class and module declarations, and > the second four around method declarations. My rationale for their > inclusion is that they cover up sequences that are quite worthless in > Ruby with mappings that mirror their original intent. This is not > unprecedented: Bram himself does it in ftplugin/vim.vim. I'm > generally against mappings in ftplugins but I think these are both > helpful and benign. > > If anyone disagrees, by all means strip them out until we can discuss > them more. I don't want them to hold up the release. Sounds good - I have no objections. Gavin? Regards, Doug From dougkearns at gmail.com Sun May 6 21:58:42 2007 From: dougkearns at gmail.com (Doug Kearns) Date: Mon, 7 May 2007 11:58:42 +1000 Subject: Imminent Vim 7.1 release, can we make it? In-Reply-To: <20070506175700.GH18708@tpope.us> References: <20070506170119.GG18708@tpope.us> <20070506175700.GH18708@tpope.us> Message-ID: <644fc65e0705061858w1997e507ra144ea1a011323b5@mail.gmail.com> On 5/7/07, Tim Pope wrote: > On Sun, May 06, 2007 at 12:01:19PM -0500, Tim Pope wrote: > > The first beta of Vim 7.1 is out, and apparently Bram intends on doing > > the release in the next few days. Doug, any chance of us doing a > > release in the next 24 hours or so, in time to make it into the next > > Vim release? I'm going to start working on the NEWS file now. Let me > > NEWS is done. Thanks! Regards, Doug From vim-ruby-devel at tpope.info Sun May 6 22:17:35 2007 From: vim-ruby-devel at tpope.info (Tim Pope) Date: Sun, 6 May 2007 21:17:35 -0500 Subject: Imminent Vim 7.1 release, can we make it? In-Reply-To: <644fc65e0705061842h7b678f93x44598fa5d5fb7cd3@mail.gmail.com> References: <20070506170119.GG18708@tpope.us> <644fc65e0705061842h7b678f93x44598fa5d5fb7cd3@mail.gmail.com> Message-ID: <20070507021735.GK18708@tpope.us> On Mon, May 07, 2007 at 11:42:00AM +1000, Doug Kearns wrote: > On 5/7/07, Tim Pope wrote: > > Hi all. > > > > The first beta of Vim 7.1 is out, and apparently Bram intends on doing > > the release in the next few days. > > Bram and his two day betas, eh? ;-) Yeah, I know. It's mostly a humdrum incremental release, so he's not anticipating many problems. > > Doug, any chance of us doing a > > release in the next 24 hours or so, in time to make it into the next > > Vim release? I'm going to start working on the NEWS file now. Let me > > know if you need any additional help; I'd really like to get the new > > eRuby stuff into 7.1. If/when you email Bram, don't forget to let him > > know to add *.erb to the ftdetect script. > > That should be fine. Have you been running from CVS since the last release? Yes, and tweaking it here and there. There is also documentation that needs to be updated (the syntax one). In addition to *.erb, there are a couple of other extensions I've added to ftdetect as well. I'm linking a patch (over the list size limit) against the latest Vim CVS that you can send to Bram if you want. It might make things easier for him. http://rails.vim.tpope.net/vim-ruby.patch Cheers, Tim From dougkearns at gmail.com Mon May 7 01:02:37 2007 From: dougkearns at gmail.com (Doug Kearns) Date: Mon, 7 May 2007 15:02:37 +1000 Subject: Imminent Vim 7.1 release, can we make it? In-Reply-To: <20070507021735.GK18708@tpope.us> References: <20070506170119.GG18708@tpope.us> <644fc65e0705061842h7b678f93x44598fa5d5fb7cd3@mail.gmail.com> <20070507021735.GK18708@tpope.us> Message-ID: <644fc65e0705062202v462cb839j3a0b42a592ae7fb0@mail.gmail.com> Tim, On 5/7/07, Tim Pope wrote: > On Mon, May 07, 2007 at 11:42:00AM +1000, Doug Kearns wrote: > > On 5/7/07, Tim Pope wrote: > > > Hi all. > > > > > > The first beta of Vim 7.1 is out, and apparently Bram intends on doing > > > the release in the next few days. > > > > Bram and his two day betas, eh? ;-) > > Yeah, I know. It's mostly a humdrum incremental release, so he's not > anticipating many problems. I've just sent the latest release to Bram. I'll send it up to rubyforge later today. Regards, Doug From vim-ruby-devel at tpope.info Mon May 7 01:26:05 2007 From: vim-ruby-devel at tpope.info (Tim Pope) Date: Mon, 7 May 2007 00:26:05 -0500 Subject: Imminent Vim 7.1 release, can we make it? In-Reply-To: <644fc65e0705062202v462cb839j3a0b42a592ae7fb0@mail.gmail.com> References: <20070506170119.GG18708@tpope.us> <644fc65e0705061842h7b678f93x44598fa5d5fb7cd3@mail.gmail.com> <20070507021735.GK18708@tpope.us> <644fc65e0705062202v462cb839j3a0b42a592ae7fb0@mail.gmail.com> Message-ID: <20070507052605.GL18708@tpope.us> On Mon, May 07, 2007 at 03:02:37PM +1000, Doug Kearns wrote: > I've just sent the latest release to Bram. I'll send it up to > rubyforge later today. Great, thanks a lot. Cheers, Tim From dougkearns at gmail.com Mon May 7 11:06:55 2007 From: dougkearns at gmail.com (Doug Kearns) Date: Tue, 8 May 2007 01:06:55 +1000 Subject: 2007.05.07 released Message-ID: <644fc65e0705070806seb1340fg4559bc9aef32f063@mail.gmail.com> Hello all, I've sent up vim-ruby-2007.05.07 to RubyForge. Regards, Doug From ryanshillington at gmail.com Wed May 9 23:58:25 2007 From: ryanshillington at gmail.com (Ryan Shillington) Date: Wed, 9 May 2007 22:58:25 -0500 Subject: I can't indent html at all. Message-ID: <154583e20705092058m7f7accaaq7435366cb3ad747@mail.gmail.com> Hey guys, I had previously installed all kinds of rails plugins (probably a mismash of things contributed to this project in their earlier days), so I uninstalled Vim altogether, did a clean re-install of Vim 7.0 on Windows and installed this vim-ruby stuff (version 2007.05.07) using the gem. Now, whenever I select code that looks like the following: <% if(@show_confirmation)%>
<%=image_tag("checkout/step5.gif", :align =>"center", :border=> 0, :width => 451, :height => 71) %>
<%end%> and press "=" which used to indent the HTML for me, I now see: <% if(@show_confirmation)%>
<%=image_tag("checkout/step5.gif", :align =>"center", :border=> 0, :width => 451, :height => 71) %>
<%end%> Ah!!! It's destroyed my html formating. The filename is called show.rhtmland I checked that the filetype is being recognized as eruby. My _vimrc is available here (http://www.thebookhauler.com/vimRuby/_vimrc) although I tried it without my _vimrc and got the same results. Any ideas what I might be doing wrong? That used to work. Thanks in advance, Ryan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/vim-ruby-devel/attachments/20070509/4f783687/attachment-0001.html From dougkearns at gmail.com Thu May 10 00:32:53 2007 From: dougkearns at gmail.com (Doug Kearns) Date: Thu, 10 May 2007 14:32:53 +1000 Subject: I can't indent html at all. In-Reply-To: <154583e20705092058m7f7accaaq7435366cb3ad747@mail.gmail.com> References: <154583e20705092058m7f7accaaq7435366cb3ad747@mail.gmail.com> Message-ID: <644fc65e0705092132sdb59cd6i412678370a1f9ebe@mail.gmail.com> G'day Ryan, On 5/10/07, Ryan Shillington wrote: > Hey guys, > > I had previously installed all kinds of rails plugins (probably a mismash of > things contributed to this project in their earlier days), so I uninstalled > Vim altogether, did a clean re-install of Vim 7.0 on Windows and installed > this vim-ruby stuff (version 2007.05.07) using the gem. > > Now, whenever I select code that looks like the following: > Ah!!! It's destroyed my html formating. The filename is called show.rhtml > and I checked that the filetype is being recognized as eruby. My _vimrc is > available here ( > http://www.thebookhauler.com/vimRuby/_vimrc) although I > tried it without my _vimrc and got the same results. > > Any ideas what I might be doing wrong? That used to work. FWIW, this works for me on a Windows box.... Your results seem to me to be consistent with the HTML indent file not being sourced. What does :let b:eruby_subtype return? Is the Ruby indented? <% if true puts "indenting works here" end %> Thanks, Doug From ryanshillington at gmail.com Thu May 10 11:11:05 2007 From: ryanshillington at gmail.com (Ryan Shillington) Date: Thu, 10 May 2007 10:11:05 -0500 Subject: I can't indent html at all. In-Reply-To: <644fc65e0705092132sdb59cd6i412678370a1f9ebe@mail.gmail.com> References: <154583e20705092058m7f7accaaq7435366cb3ad747@mail.gmail.com> <644fc65e0705092132sdb59cd6i412678370a1f9ebe@mail.gmail.com> Message-ID: <154583e20705100811q7223c156n613eb40c1a747e57@mail.gmail.com> Hi Doug, Yup, the ruby is indented just fine. The result of ":let b:eruby_subtype" is "b:eruby_subtype html". Thanks for the quick reply - I appreciate it. Ryan On 5/9/07, Doug Kearns wrote: > > G'day Ryan, > > On 5/10/07, Ryan Shillington wrote: > > Hey guys, > > > > I had previously installed all kinds of rails plugins (probably a > mismash of > > things contributed to this project in their earlier days), so I > uninstalled > > Vim altogether, did a clean re-install of Vim 7.0 on Windows and > installed > > this vim-ruby stuff (version 2007.05.07) using the gem. > > > > Now, whenever I select code that looks like the following: > > > > > Ah!!! It's destroyed my html formating. The filename is called > show.rhtml > > and I checked that the filetype is being recognized as eruby. My _vimrc > is > > available here ( > > http://www.thebookhauler.com/vimRuby/_vimrc) although I > > tried it without my _vimrc and got the same results. > > > > Any ideas what I might be doing wrong? That used to work. > > FWIW, this works for me on a Windows box.... > > Your results seem to me to be consistent with the HTML indent file not > being sourced. What does :let b:eruby_subtype return? Is the Ruby > indented? > > <% > if true > puts "indenting works here" > end > %> > > Thanks, > Doug > _______________________________________________ > vim-ruby-devel mailing list > vim-ruby-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/vim-ruby-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/vim-ruby-devel/attachments/20070510/a8e8dcc6/attachment.html From dougkearns at gmail.com Thu May 10 11:45:54 2007 From: dougkearns at gmail.com (Doug Kearns) Date: Fri, 11 May 2007 01:45:54 +1000 Subject: I can't indent html at all. In-Reply-To: <154583e20705100811q7223c156n613eb40c1a747e57@mail.gmail.com> References: <154583e20705092058m7f7accaaq7435366cb3ad747@mail.gmail.com> <644fc65e0705092132sdb59cd6i412678370a1f9ebe@mail.gmail.com> <154583e20705100811q7223c156n613eb40c1a747e57@mail.gmail.com> Message-ID: <644fc65e0705100845w1fd784e1taa0e2398d9ecbeb6@mail.gmail.com> On 5/11/07, Ryan Shillington wrote: > Hi Doug, > > Yup, the ruby is indented just fine. The result of ":let b:eruby_subtype" > is "b:eruby_subtype html". Hmm, does :scriptnames include .../indent/html.vim when run on an *.rhtml file? What does :let b:eruby_subtype_indentexpr return? Doug From vim-ruby-devel at tpope.info Thu May 10 12:52:22 2007 From: vim-ruby-devel at tpope.info (Tim Pope) Date: Thu, 10 May 2007 11:52:22 -0500 Subject: I can't indent html at all. In-Reply-To: <154583e20705100811q7223c156n613eb40c1a747e57@mail.gmail.com> References: <154583e20705092058m7f7accaaq7435366cb3ad747@mail.gmail.com> <644fc65e0705092132sdb59cd6i412678370a1f9ebe@mail.gmail.com> <154583e20705100811q7223c156n613eb40c1a747e57@mail.gmail.com> Message-ID: <20070510165222.GB9632@tpope.us> On Thu, May 10, 2007 at 10:11:05AM -0500, Ryan Shillington wrote: > Hi Doug, > > Yup, the ruby is indented just fine. The result of ":let b:eruby_subtype" > is "b:eruby_subtype html". > > Thanks for the quick reply - I appreciate it. In addition to what Doug asked you to check, can you tell me if you have syntax highlighting and/or filetype plugins enabled? If so, does the syntax highlighting appear to be working correctly? From ryanshillington at gmail.com Fri May 11 09:57:16 2007 From: ryanshillington at gmail.com (Ryan Shillington) Date: Fri, 11 May 2007 08:57:16 -0500 Subject: I can't indent html at all. In-Reply-To: <20070510165222.GB9632@tpope.us> References: <154583e20705092058m7f7accaaq7435366cb3ad747@mail.gmail.com> <644fc65e0705092132sdb59cd6i412678370a1f9ebe@mail.gmail.com> <154583e20705100811q7223c156n613eb40c1a747e57@mail.gmail.com> <20070510165222.GB9632@tpope.us> Message-ID: <154583e20705110657l74a194aal78de9c0c12eefab1@mail.gmail.com> Yes, when I run :scriptnames line 35 is c:\vim\vim70\indent\html.vim. "let b:eruby_subtype_indentexpr" returns "HtmlIndentGet(v:lnum)". To Tim, yes, I do have syntax highlighting turned on, and it's working. I have the following lines in my _vimrc: syntax on " Enable syntax highlighting filetype on " Enable filetype detection filetype indent on " Enable filetype-specific indenting filetype plugin on " Enable filetype-specific plugins Sorry to be such a pain. Thanks again for your help. Ryan On 5/10/07, Tim Pope wrote: > > On Thu, May 10, 2007 at 10:11:05AM -0500, Ryan Shillington wrote: > > Hi Doug, > > > > Yup, the ruby is indented just fine. The result of ":let > b:eruby_subtype" > > is "b:eruby_subtype html". > > > > Thanks for the quick reply - I appreciate it. > > In addition to what Doug asked you to check, can you tell me if you > have syntax highlighting and/or filetype plugins enabled? If so, does > the syntax highlighting appear to be working correctly? > _______________________________________________ > vim-ruby-devel mailing list > vim-ruby-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/vim-ruby-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/vim-ruby-devel/attachments/20070511/64ffab46/attachment.html From vim-ruby-devel at tpope.info Fri May 11 11:04:13 2007 From: vim-ruby-devel at tpope.info (Tim Pope) Date: Fri, 11 May 2007 10:04:13 -0500 Subject: I can't indent html at all. In-Reply-To: <154583e20705110657l74a194aal78de9c0c12eefab1@mail.gmail.com> References: <154583e20705092058m7f7accaaq7435366cb3ad747@mail.gmail.com> <644fc65e0705092132sdb59cd6i412678370a1f9ebe@mail.gmail.com> <154583e20705100811q7223c156n613eb40c1a747e57@mail.gmail.com> <20070510165222.GB9632@tpope.us> <154583e20705110657l74a194aal78de9c0c12eefab1@mail.gmail.com> Message-ID: <20070511150413.GC9632@tpope.us> On Fri, May 11, 2007 at 08:57:16AM -0500, Ryan Shillington wrote: > Yes, when I run :scriptnames line 35 is c:\vim\vim70\indent\html.vim. "let > b:eruby_subtype_indentexpr" returns "HtmlIndentGet(v:lnum)". > > To Tim, yes, I do have syntax highlighting turned on, and it's working. I > have the following lines in my _vimrc: > > syntax on " Enable syntax highlighting > filetype on " Enable filetype detection > filetype indent on " Enable filetype-specific indenting > filetype plugin on " Enable filetype-specific plugins > > Sorry to be such a pain. Thanks again for your help. > > Ryan Please check the value of "set indentexpr?" and confirm that it is "GetErubyIndent()". If it is, try putting the cursor on a line that is indenting incorrectly (like line 2 of the following example) Then do :let v:lnum = line(".")|echo GetErubyIndent() This function is supposed to return the number of spaces that the line should start with. Tell me what it returns. This might be an error message, or multiple error messages. If you have trouble copying and pasting these errors, do :redir @"> before the command and redir END afterwords. This will copy the content where it can be pasted with "p". Cheers, Tim From gsinclair at gmail.com Sun May 13 07:24:54 2007 From: gsinclair at gmail.com (Gavin Sinclair) Date: Sun, 13 May 2007 21:24:54 +1000 Subject: Change of administrator? (Was: Imminent Vim 7.1 release, can we make it?) Message-ID: On 5/7/07, Doug Kearns wrote: > > I'm generally against mappings in ftplugins but I think these are both > > helpful and benign. > > > > If anyone disagrees, by all means strip them out until we can discuss > > them more. I don't want them to hold up the release. > > Sounds good - I have no objections. Gavin? Sorry for the late reply. No objections from me, but no need to consult me, either :) If someone would like to take over the administration of this project from me, please do. I'll still follow the list with interest, but the reality is this: I haven't contributed anything for ages and that's unlikely to change. Doug: you've been managing releases and so on for quite a while. Want your name up in lights at Rubyforge? :) Cheers, Gavin From ryanshillington at gmail.com Sun May 13 19:02:25 2007 From: ryanshillington at gmail.com (Ryan Shillington) Date: Sun, 13 May 2007 18:02:25 -0500 Subject: I can't indent html at all. In-Reply-To: <20070511150413.GC9632@tpope.us> References: <154583e20705092058m7f7accaaq7435366cb3ad747@mail.gmail.com> <644fc65e0705092132sdb59cd6i412678370a1f9ebe@mail.gmail.com> <154583e20705100811q7223c156n613eb40c1a747e57@mail.gmail.com> <20070510165222.GB9632@tpope.us> <154583e20705110657l74a194aal78de9c0c12eefab1@mail.gmail.com> <20070511150413.GC9632@tpope.us> Message-ID: <154583e20705131602r2b92342n185b4b62debb454d@mail.gmail.com> Yes, "set indentexpr?" returns "GetErubyIndent()". When I put my cursor on the line in your example, I get zero - no error messages. Strange. When I wrapped it in a ruby <% if %> statement, it returned 2 - so it's returning the right number, its just not taking the HTML level into account. Really strange. Ryan On 5/11/07, Tim Pope wrote: > > On Fri, May 11, 2007 at 08:57:16AM -0500, Ryan Shillington wrote: > > Yes, when I run :scriptnames line 35 is c:\vim\vim70\indent\html.vim. > "let > > b:eruby_subtype_indentexpr" returns "HtmlIndentGet(v:lnum)". > > > > To Tim, yes, I do have syntax highlighting turned on, and it's > working. I > > have the following lines in my _vimrc: > > > > syntax on " Enable syntax highlighting > > filetype on " Enable filetype detection > > filetype indent on " Enable filetype-specific indenting > > filetype plugin on " Enable filetype-specific plugins > > > > Sorry to be such a pain. Thanks again for your help. > > > > Ryan > > Please check the value of "set indentexpr?" and confirm that it is > "GetErubyIndent()". If it is, try putting the cursor on a line that > is indenting incorrectly (like line 2 of the following example) > >
> > > Then do > > :let v:lnum = line(".")|echo GetErubyIndent() > > This function is supposed to return the number of spaces that the line > should start with. Tell me what it returns. This might be an error > message, or multiple error messages. If you have trouble copying and > pasting these errors, do > > :redir @"> > > before the command and > > redir END > > afterwords. This will copy the content where it can be pasted with > "p". > > Cheers, > Tim > _______________________________________________ > vim-ruby-devel mailing list > vim-ruby-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/vim-ruby-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/vim-ruby-devel/attachments/20070513/f3ccec05/attachment-0001.html From vim-ruby-devel at tpope.info Sun May 13 22:06:25 2007 From: vim-ruby-devel at tpope.info (Tim Pope) Date: Sun, 13 May 2007 21:06:25 -0500 Subject: I can't indent html at all. In-Reply-To: <154583e20705131602r2b92342n185b4b62debb454d@mail.gmail.com> References: <154583e20705092058m7f7accaaq7435366cb3ad747@mail.gmail.com> <644fc65e0705092132sdb59cd6i412678370a1f9ebe@mail.gmail.com> <154583e20705100811q7223c156n613eb40c1a747e57@mail.gmail.com> <20070510165222.GB9632@tpope.us> <154583e20705110657l74a194aal78de9c0c12eefab1@mail.gmail.com> <20070511150413.GC9632@tpope.us> <154583e20705131602r2b92342n185b4b62debb454d@mail.gmail.com> Message-ID: <20070514020624.GB17588@tpope.us> On Sun, May 13, 2007 at 06:02:25PM -0500, Ryan Shillington wrote: > Yes, "set indentexpr?" returns "GetErubyIndent()". > > When I put my cursor on the line in your example, I get zero - no error > messages. Strange. > > When I wrapped it in a ruby <% if %> statement, it returned 2 - so it's > returning the right number, its just not taking the HTML level into > account. Really strange. Try :echo HtmlIndentGet(line('.')) and see what that says. Then try :set ft=html and the same echo command and see if it changes. You should also to try experimenting with removing all other plugins. I'm starting to suspect foul play on someone else's part. Cheers, Tim From vim-ruby-devel at tpope.info Wed May 16 01:44:29 2007 From: vim-ruby-devel at tpope.info (Tim Pope) Date: Wed, 16 May 2007 00:44:29 -0500 Subject: ruby << EOF in vimscript broken in Vim 7.1 Message-ID: <20070516054429.GG17588@tpope.us> Hi all, As the subject states, the following is broken in Vim script syntax highlighting in 7.1. This was overlooked because vim.vim always sources the ruby.vim from the current directory, not the one from the runtimepath. ruby << EOF def foo end EOF Apparently, the use of TOP is taken to mean vim script, not ruby, even though it is declared in vim script. Most of this is inside the "expensive" ruby block stuff. Skipping this (ala eruby) might be a cheap way to fix this problem. Anyone have any other easy ideas? I'll look at the more tomorrow; I just wanted to get it out there so people can think about it. Cheers, Tim From dougkearns at gmail.com Wed May 16 10:52:31 2007 From: dougkearns at gmail.com (Doug Kearns) Date: Thu, 17 May 2007 00:52:31 +1000 Subject: ruby << EOF in vimscript broken in Vim 7.1 In-Reply-To: <20070516054429.GG17588@tpope.us> References: <20070516054429.GG17588@tpope.us> Message-ID: <644fc65e0705160752s3aa3c4dbj464eb664616c3a4a@mail.gmail.com> On 5/16/07, Tim Pope wrote: > Hi all, > > As the subject states, the following is broken in Vim script syntax > highlighting in 7.1. This was overlooked because vim.vim always > sources the ruby.vim from the current directory, not the one from the > runtimepath. Hmmm...doesn't seem like a good idea to me but this inclusion method is quite common in the syntax files. What am I missing? > ruby << EOF > def foo > end > EOF > > Apparently, the use of TOP is taken to mean vim script, not ruby, > even though it is declared in vim script. Most of this is inside the > "expensive" ruby block stuff. Skipping this (ala eruby) might be a > cheap way to fix this problem. Anyone have any other easy ideas? Yeah, it sounds like a problem for Chip. :) > I'll look at the more tomorrow; I just wanted to get it out there so > people can think about it. That would be great if you can - I won't be able to get to it until next week. Fortunately, you may be the only one currently in need of a fix. ;-) Regards, Doug From dougkearns at gmail.com Wed May 16 11:00:31 2007 From: dougkearns at gmail.com (Doug Kearns) Date: Thu, 17 May 2007 01:00:31 +1000 Subject: Change of administrator? (Was: Imminent Vim 7.1 release, can we make it?) In-Reply-To: References: Message-ID: <644fc65e0705160800i441103eaqb116f7de15296cc7@mail.gmail.com> Hello Gavin, On 5/13/07, Gavin Sinclair wrote: > On 5/7/07, Doug Kearns wrote: > Sorry for the late reply. No objections from me, but no need to > consult me, either :) Heh, you're still the maintainer and IIRC you were quite keen on keeping it basic. > If someone would like to take over the administration of this project > from me, please do. I'll still follow the list with interest, but the > reality is this: I haven't contributed anything for ages and that's > unlikely to change. > > Doug: you've been managing releases and so on for quite a while. Want > your name up in lights at Rubyforge? :) Well, I tend to shun publicity but I suspect my anonymity is safe even if I do accept your offer. ;-) Actually, you Tim and I are all listed as administrators. What extra powers are you offering to relinquish? Regards, Doug From vim-ruby-devel at tpope.info Wed May 16 11:47:32 2007 From: vim-ruby-devel at tpope.info (Tim Pope) Date: Wed, 16 May 2007 10:47:32 -0500 Subject: ruby << EOF in vimscript broken in Vim 7.1 In-Reply-To: <644fc65e0705160752s3aa3c4dbj464eb664616c3a4a@mail.gmail.com> References: <20070516054429.GG17588@tpope.us> <644fc65e0705160752s3aa3c4dbj464eb664616c3a4a@mail.gmail.com> Message-ID: <20070516154732.GJ17588@tpope.us> On Thu, May 17, 2007 at 12:52:31AM +1000, Doug Kearns wrote: > On 5/16/07, Tim Pope wrote: > > I'll look at the more tomorrow; I just wanted to get it out there so > > people can think about it. > > That would be great if you can - I won't be able to get to it until > next week. Fortunately, you may be the only one currently in need of > a fix. ;-) I was actually researching another problem when I discovered this. All the rails specific omnicompletion (and probably, everything involving buffer loading), has stopped working for me as of 7.1, even with all applicable optios set and identical versions of rubycomplete.vim. Mark Guzman, can you shed any light on this? I'm a bit short on time this week myself, as I am attending RailsConf this weekend. There's still plenty of time before Vim 7.2 though, and I've already gotten started. One thing I have discovered so far: There are only 23 uses of contains=TOP in all the syntax files shipped with vim. Of those, 17 are in ruby.vim. Apparently, this feature isn't used nearly as widely as I would have expected. The more common solution involves ALLBUT. ALLBUT does work as you would hope when a syntax file is included, also discluding groups from the contained file, whereas TOP dumbly takes the TOP of the including file (if that makes sense at all). I originally switched to using TOP because it seemed cleaner than constantly updating the list of discluded groups. I am switching to using contains=ALLBUT, at rubyNotTop. This appears to fix the issue. Keep an eye out for groups I forgot to add to the rubyNotTop cluster. After the dust settles (maybe give it a couple of weeks), I'd like to see a bugfix release, if nobody minds. Unfortunately, syntax/vim.vim will still read the ruby.vim that ships with Vim unless users take an additional step. But, at least we will have made that much possible. Cheers, Tim From gsinclair at gmail.com Fri May 18 11:50:28 2007 From: gsinclair at gmail.com (Gavin Sinclair) Date: Sat, 19 May 2007 01:50:28 +1000 Subject: Change of administrator? (Was: Imminent Vim 7.1 release, can we make it?) In-Reply-To: <644fc65e0705160800i441103eaqb116f7de15296cc7@mail.gmail.com> References: <644fc65e0705160800i441103eaqb116f7de15296cc7@mail.gmail.com> Message-ID: On 5/17/07, Doug Kearns wrote: > > > Sorry for the late reply. No objections from me, but no need to > > consult me, either :) > > Heh, you're still the maintainer and IIRC you were quite keen on > keeping it basic. It never occurred to me that whatever was being discussed was not basic. I probably didn't fully understand it anyway :) > > If someone would like to take over the administration of this project > > from me, please do. I'll still follow the list with interest, but the > > reality is this: I haven't contributed anything for ages and that's > > unlikely to change. > > > > Doug: you've been managing releases and so on for quite a while. Want > > your name up in lights at Rubyforge? :) > > Well, I tend to shun publicity but I suspect my anonymity is safe even > if I do accept your offer. ;-) > > Actually, you Tim and I are all listed as administrators. What extra > powers are you offering to relinquish? Good point. I'm offering to relinquish any presumption among other people that I need to be consulted on changes. If people want to make drastic changes to the project, so be it. Even if I objected, I wouldn't pretend that my objection would count for anything :) It's good that you two are administrators; it means the project is in good hands. Gavin From segfault at hasno.info Fri May 18 22:30:49 2007 From: segfault at hasno.info (Mark Guzman) Date: Fri, 18 May 2007 22:30:49 -0400 Subject: ruby << EOF in vimscript broken in Vim 7.1 In-Reply-To: <20070516154732.GJ17588@tpope.us> References: <20070516054429.GG17588@tpope.us> <644fc65e0705160752s3aa3c4dbj464eb664616c3a4a@mail.gmail.com> <20070516154732.GJ17588@tpope.us> Message-ID: <464E6159.4050702@hasno.info> Tim Pope wrote: > I was actually researching another problem when I discovered this. > All the rails specific omnicompletion (and probably, everything > involving buffer loading), has stopped working for me as of 7.1, even > with all applicable optios set and identical versions of > rubycomplete.vim. Mark Guzman, can you shed any light on this? I'll look into it this weekend, I've been working on overhauling the rubycomplete stuff anyway. Can you email me tarball of your vim config and possibly point me at some example code where it breaks? My initial testing under windows, linux and osx doesn't show any issue currently. I'm testing with mephisto on all platforms and it's possible that something that's getting loaded from the buffer is effecting the completion stuff. The probability on that last one is pretty low, as the current version doesn't load the actual code from the buffer, only skeletal method/class definitions. --mark From segfault at hasno.info Sun May 20 15:50:25 2007 From: segfault at hasno.info (Mark Guzman) Date: Sun, 20 May 2007 15:50:25 -0400 Subject: ruby << EOF in vimscript broken in Vim 7.1 In-Reply-To: <464E6159.4050702@hasno.info> References: <20070516054429.GG17588@tpope.us> <644fc65e0705160752s3aa3c4dbj464eb664616c3a4a@mail.gmail.com> <20070516154732.GJ17588@tpope.us> <464E6159.4050702@hasno.info> Message-ID: <4650A681.2030305@hasno.info> Mark Guzman wrote: > Tim Pope wrote: >> I was actually researching another problem when I discovered this. >> All the rails specific omnicompletion (and probably, everything >> involving buffer loading), has stopped working for me as of 7.1, even >> with all applicable optios set and identical versions of >> rubycomplete.vim. Mark Guzman, can you shed any light on this? Just to keep you updated, I've managed to trigger a bug. I don't know if it's related but I am working on it currently. It seems to involve trying to complete variables inside of a class definition while editing a rails file. --mark