Easy way to select current matching scope?

When I'm editing a JSP or a Java class, and the cursor is at the beginning of a , ) or } ), is there any key combo I can press once to select/highlight to the end of the scope? It's easy in Homesite.. you can CTRL-Double-Click or CTRL-SHIFT-Double-Click and you get these behaviors:

text

CTRL-Double-Click on

and it selects the opening

element. CTRL-SHIFT-Double-Click and it selects the entire tag, from

to

]]> and everything in between.

Anything similar in IDEA?

4 comments

Doesn't Ctrl-Shift-} work?

--
Valentin Kipiatkov
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"

"Ian Zabel" <ian@ezabel.com> wrote in message
news:4585710.1067006758693.JavaMail.javamailuser@localhost...

When I'm editing a JSP or a Java class, and the cursor is at the beginning

of a < or ( or { or anything that IDEA matches to the closing scope ( >, )
or } ), is there any key combo I can press once to select/highlight to the
end of the scope?
>

It's easy in Homesite.. you can CTRL-Double-Click or

CTRL-SHIFT-Double-Click and you get these behaviors:
>

<h1>
text
</h1>

>

CTRL-Double-Click on <h1> and it selects the opening <h1> element.

CTRL-SHIFT-Double-Click and it selects the entire tag, from to and everything in between. >]]>

Anything similar in IDEA?



0

Thanks. This is close to what I'm looking for.

Seems buggy tho. I just tried it in a jsp, on this code:

|   ]]>*

I hit CTRL-SHIFT-} where the | is, and it selected all the way to the * instead of to the end of the tr.

0

and on this:

|<cqt:ForEach name="foo" type="foo.bar.Foo" group="<%= bean.getData() %>" >
</cqt:ForEach>

Hitting CTRL-SHIFT-} where the | does nothing.

0

See SCR 2480 for more discussion on the problems with CTRL-[, CTRL-], CTRL-SHIFT-[, and CTRL-SHIFT-]. Some of the reported behavior is out of date now, but numerous problems still exist (especially when matching parens).

0

Please sign in to leave a comment.