Keystroke to go to matching brace? Follow
I know about the go to matching code block start|end; what I'm after is the
magic keystroke that will allow me to go to the matching brace position,
regardless of the brace (and therefore scope) type, so I would like to be able
to go between () [] {}, hopefully with selection.
The current behaviour insists on code blocks so I cannot select expressions for example.
Anyone knows what the action is called (it must be there since the matching brace is already highlighted automatically...)?
Cheers,
Bonny
Please sign in to leave a comment.
control + []
Bonny Rais wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
Does not work on a German keyboard...
control + {} ?
Tom wrote:
>> control + []
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
Same problem, {[]]} are all only reachable with AltGr and this combination is not usable as a shortcut :(
I use () to move without selection and stopped using bookmarks 8 and 9.
CU
Ralf
Hi!
I mapped them to Ctrl-AltGr-8 and Ctrl-AltGr-9, didn't use the "move
with selection" feature.
Ciao,
Mario
Maxim Mossienko (JetBrains) wrote:
That's for moving to the start/end of the current code block, which...
>> I know about the go to matching code block start|end;
...Bonny knows about.
>> what I'm after
>> is the magic keystroke that will allow me to go to the matching brace
>> position, regardless of the brace (and therefore scope) type, so I
>> would like to be able
>> to go between () [] {}, hopefully with selection. The current
>> behaviour insists on code blocks so I cannot select expressions for
>> example.
You can almost get what you want with a combination of the Lysosome
plug-in and judicious use of ctrl+w, but I think specific support in
IDEA would be very welcome. I think it could work as follows: if a
matching pair of parentheses, braces or brackets is highlighted (because
of the caret position) then some keystroke should move the caret to the
other position that causes the matching pair to continue to be highlighted.
Maybe file a JIRA request?
--
Mark Scott
mark@codebrewer.com
Still not easily to handle for a single hand, isn't it?
T> Still not easily to handle for a single hand, isn't it?
The point is that you can map the actions to whatever keyboard shortcut you
want.
done : http://www.jetbrains.net/jira/browse/IDEA-12068
My point is, that IMHO there should be default short-cuts which work on
every keyboard. This should be possible to restrict to modifier combinations
with letters (A...Z), digits (1...0), function keys (F1...F10/F12), space,
tab, cursor keys, ins, del, home, end, page up/down, number pad. Special
characters (<>,.-;:_#'+*!"§$%&/()=?{[]}\|) which might not be reachable
without another modifier, should be avoided.
Are you aware of how many keyboard layouts exist? E.g. the digits (1..0)
are only reachable with shift on a French keyboard, and home/end are
only reachable with the function modifier on some notebook keyboards. So
restricting shortcuts to the common set of every keyboard would leave
you with very few possibilities.
Tom wrote:
Which is why I would propose to go through a thorough revision of all keyboard shortcuts and make much more use of double stroke shortcuts.
My suggestion would be to keep only a small number of really often used shortcuts (e.g. like CTRL-W) and re-assign everything else in a more consistent manner (as far as the use of function and modifier keys is concerned).
JB could then support (at least for a transition period) both shortcut layouts (much like the "classic" vs. "modern layout" support for the IDE settings a few years back). Also, the "reformed" shortcut layout could impose restrictions on the allowed keys and possibly force plugin action shortcuts to use double strokes (or at least discourage users from overriding this).
Maybe a reform like this would make it easier for new users to remember shortcuts. What are your thoughts on this?
Regards,
Jens
Hi Martin,
Well, I just can guess.
> E.g. the digits (1..0) are only reachable with shift on a French keyboard
Really? I did not expect that.
Tom
On 2007-03-21 14:34:59 +0300, Jens Voss <no_reply@jetbrains.com> said:
>> restricting shortcuts to the common set of every
>> keyboard would leave
>> you with very few possibilities.
Not everyone likes double strokes. Personally, I hate em.
On 2007-03-21 10:03:16 +0300, Tom <noname@jetbrains.com> said:
Ins key is missing on Mac.
On 2007-03-21 10:03:16 +0300, Tom <noname@jetbrains.com> said:
And many Fxx keys and their combinations bound to various operating
system level shortcuts on Mac.
How about that?
But there is a Help key on this position - at least on my keyboard. And
detecting a Mac OS is much easier than detecting different keyboards.
Or on KDE.
I've deactivated the OS shortcuts where possible.
It is funny, as German keyboards have square and curly braces under special keys and shortcuts which uses them does not work.
The one which works is "Ctrl + Shift + m".