SublimeCodeIntel allows you to cycle through an autocompletion list with ctrl+space.[/quote]
Thanks, I’ve downloaded BracketHighlighter, but it doesn’t behave as Textmate does where it highlights the brackets in a clear yellow solid colour. It seems to put an underscore on them (something recent versions of ST2 already did) but the solid option, though turned on in the prefs, does not work for me.
Also, CodeIntel I had to disable due to the undo problem.
If you are getting underlining as well as colored blocks, it is because you have ST2’s version of bracket highlighting enabled as well. You can turn off ST2’s default bracket matching, and use just BracketHighlighters, and then configure BracketHighlighter to the style and color you prefer.
Originally I used SublimeBrackets as well, but it will bog down the editor with its current implementation in large files; this is an outstanding issue that I could not live with. BracketHighlighter is a fork of SublimeBrackets and SublimeTagmatcher that fixes these performance issues and adds new features. I never got a response back from pyparadigm about the performance issue which is why I decided to create BracketHighlighter. By no means am I saying you need to switch to BracketHighlighter, but I wanted to illustrate why there are two different highlight packages, and illustrate why SublimeBrackets will not give you extremely different results since BracketHighlighter and SublimeBrackets both have the same origin. BracketHighlighter streamlined the matching processes into one that will not bog down your system and cause your typing and selecting to stutter.
[quote]Better completion (in Textmate on a Ruby doc, hitting ‘#’ inside double quotes will automatically make it ‘#{}’. And typing ‘<%=’ will close it with a ‘%>’. These are small but wonderful improvements)
[/quote]
For the ruby completion, add this to your User key-bindings:
{
"args": {
"contents": "#{${0:$SELECTION}}"
},
"command": "insert_snippet",
"context":
{
"key": "selector",
"match_all": true,
"operand": "string.quoted.double.ruby",
"operator": "equal"
}
],
"keys":
"#"
]
},
Originally I used SublimeBrackets as well, but it will bog down the editor with its current implementation in large files; this is an outstanding issue that I could not live with. BracketHighlighter is a fork of SublimeBrackets and SublimeTagmatcher that fixes these performance issues and adds new features. I never got a response back from pyparadigm about the performance issue which is why I decided to create BracketHighlighter. By no means am I saying you need to switch to BracketHighlighter, but I wanted to illustrate why there are two different highlight packages, and illustrate why SublimeBrackets will not give you extremely different results since BracketHighlighter and SublimeBrackets both have the same origin. BracketHighlighter streamlined the matching processes into one that will not bog down your system and cause your typing and selecting to stutter.[/quote]
Ah, I didn’t know this. Many thanks for the info. I am new to Sublime Text (3 days and counting) so just getting my head around the different plugins.
[quote=“C0D312”]
For the ruby completion, add this to your User key-bindings:[/quote]
Superb! Thanks. What about getting it to close the <%= and <% tags, how can I accomplish that?
Dev build of ST2 or SublimeCodeIntel? I’ve got the latest ST2 (just updated right now) I installed SCI from ST2’s package manager, should I get it from Github instead?
Another problem I have is that any time I type an equal sign it adds %>. I only want the closing bracket if the equal sign is preceded by <
Let me clarify, it does this while inside a <%= when I try to type something like ‘:controller =>’ because of course it’s matching the ‘<%=’ from the beginning of the line. Just wondering if there is a way to avoid this.
I use this all the time – really handy command. It won’t auto close your <% like you’re asking, but once you get accustomed to ctrl-shift-period to quickly insert a <%= %> block (and cycle through the variations thereof), it’s much faster than manually typing the starting <%.
Unfortunately, it doesn’t fix it. But I’m using SublimeERB and that seems fine for now. Eventually I’d really like to find out how to close those tags with the snippets.