-
Notifications
You must be signed in to change notification settings - Fork 12
Broken % command? #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This will be an interesting puzzle to solve (I myself don't have enough time on a computer to solve it, these days). There is a complex interrelationship between the parts involved. One avenue would be to disable the "Rainbow Parens" part of I do not mean this to sound like a warning to stay away from it - by all means, anyone can dive and and figure this out - but only as a heads-up that this will require tinkering. If you come up with something that works just go for it, and we can sort out side effects later. |
I'm beginning to dig into this a little, and I'll put notes from my exploration here, in case anyone else wants to follow me. I'm working with a small test file that looks like this: foo("thing thang") do
some.code((((("here do")))))
end The extraneous nested parens are just to make it more obvious to me that the nesting is off. The first thing I tried was going to line 67 and commenting it out. Sure enough it turned the parens all the same color... but |
Wow. I got lucky and seem to have narrowed it down right fast. It's line 743. If I comment this out, things seem OK. Seeing that the line said something about strings, I changed my test document to foo("thing thang") do
some.code((((("do")))))
end
foo("thing thang") do
some.code(((((:do)))))
end And, sure enough, the So. Interpolated strings it is. I don't know anything about vimscript, so the first thing I'm gonna learn is how to read this line, so I can figure out what it's actually about. |
More information: If the block is made of curly braces, it also gets confused: foo("thing thang") {
some.code((((("{")))))
} I thought it might have something to do with the |
Well... I narrowed it some more. It has something to do with the group name being syn region rubyString matchgroup=detailedInterpolatedStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial,@Spell fold it works OK. I have no idea if this would have additional fallout, though, as far as altered behavior. |
Also, I just noticed that putting a |
There's the code that makes it "work". This isn't an actual fix. I'd love to see if this jogs any good ideas out of someone more experienced. |
@wwalker I haven't looked at this in ages, but I've learned a little bit about Vim syntax files since then. I don't really have an opinion about forks or not forks or whatever. Is @rking completely MIA? Like, if someone forked it, would they have to change the name in order to publish to vim scripts? |
I've not seen RKing or heard about him for nearly two years. He lived here in Austin, so I actually saw with him a couple of times at ruby events Could just start a similar project. |
Cool. I'm up for whatever. I have push access to this repo, so if you fork this, let me know, and I can make a big note at the top of the README that the new thing supersedes it. |
I have a ruby file called
foo.rb
:If I put my cursor on line 3 and hit
%
, it should jump to the end of line 1. Instead, it jumps to the end of the string in line 2. I did a binary search through my .vimrc and figured out that when I comment out this line, the expected behavior returns.I noticed this when writing RSpec examples when
it "doesn't do anything"
andit "adds the header to the array for the existing record"
. Both "do" and "for" caused%
to freak out.I have no idea what might cause a color scheme to have this kind of effect, but...
Anyone else replicate this or have an idea of what might be the cause? Or where, at least, to start poking around in this code base to find something?