Home Download Buy Blog Forum Support

Brace matching (CTRL+M) equivalent for Ruby structures?

Brace matching (CTRL+M) equivalent for Ruby structures?

Postby JMM on Fri Feb 03, 2012 1:26 pm

Is there a built-in feature or plugin to:

1) Do the equivalent of brace / bracket matching (e.g. CTRL+M) for "braceless" Ruby structures, such as:

Code: Select all
def
end

do
end

begin
[rescue]
end

if
[else]
end


I know that if the contents of these "blocks" are indented, ST2 provides a visual indication of their "scope" and the ability to fold them by clicking an icon next to the line number. I'm looking for a keyboard shortcut and the ability to go from start to end or end to start, like CTRL+M. In this case, it's probably good enough if there's an implementation that relies on indentation, and I imagine it would be much harder to implement something like this without relying on indentation.


2) Do the equivalent for HTML start / end tags (i.e. keyboard shortcut to jump from start tag to end tag and vice versa), without relying on indentation? In a search, I found a thread where someone asked about this in December, and I see the response says there's no functionality for it in ST2, so I guess it would have to be a plugin for this one.
JMM
 
Posts: 9
Joined: Fri Feb 03, 2012 1:23 pm
Location: Portsmouth NH

Re: Brace matching (CTRL+M) equivalent for Ruby structures?

Postby JMM on Mon Feb 20, 2012 8:38 pm

I created a plugin to address this.
JMM
 
Posts: 9
Joined: Fri Feb 03, 2012 1:23 pm
Location: Portsmouth NH


Return to Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 20 guests