Closed taoeffect closed 11 years ago
Sorry, I should have documented this already.
The current way is to insert two new brackets with {, then to delete the bracket you don't need with shift+backspace. I'm not sure this is the best solution, but I think it works fairly well. I might add shortcuts that always inserts a single bracket, but I'm not sure that's a good idea. Mostly because beginners will quickly turn to using those shortcuts instead since it's way easier than doing it the paredit way when you're not used to it (I have personally done this a lot).
I think that we can at least both agree that your solution for fixing this problem is ... counter-intuitive at best, and that's putting it delicately.
Ideally, placing the caret where it is in the code above and hitting } should close the brace. Paredit should figure out that a brace needs to be matched there. Sublime (or one of the plugins I'm using) notices and puts a ? mark in the gutter next to the line with the open brace, so maybe you could piggieback on whatever behavior does that.
Oh right, I totally forgot about that. I didn't want to do that since I thought it would have to search the whole file to see if a { is unmatched every time. I think it might be possible without doing that though. I'll think about it.
I don't see a ? in the gutter, my guess would be that you have https://github.com/facelessuser/BracketHighlighter installed.
Yeah, I do have that installed. Just ran into this again, except with parens this time:
I just realized this was really easy to do. I feel silly now. :D
Thanks for opening the issue and telling me the right way to do it! :+1:
Awesome! Thanks for fixing this! :smiley:
Can you update the version settings for the Sublime package manager? I'd love to test it out! :)
It should be updated automatically. Either use Package Control: Upgrade Package in the command palette or restart sublime, that should do it.
Hmm, I did the Upgrade Package command, and it gave me a list of packages that could be updated. paredit wasn't one of them. I tried restarting Sublime also but that didn't work...
That's really odd. Did you install paredit manually?
Nope, through the package manager. Just removed it (using the package manager) and reinstalled it. The version listed for installing it was the same as it was listed when I removed it:
I see. The reason is probably because Package Control only updates every 30 minutes, if I'm not mistaken. I thought upgrading it manually would circumvent that, but I guess not...
Even so, it should fetch it from the repository, so you can test if the patch made it into your version.
EDIT: When you re-installed it that is.
Ah I see. Woo hoo!! It works! Thanks for fixing this so quickly! :-D
No problem, thanks for opening the issue. :)
Don't hesitate to open more if you find something else!
The opening brace in front of :doc is not balanced. The pipe is positioned where it should be inserted (near the very end).
For the life of me I can't figure out how to insert that damned brace while paredit is running. This shouldn't be possible. Paredit should make my life easier, not more difficult. Not sure if this is a dup of #6.