How to jump to the matching bracket

78 views
Skip to first unread message

Vlad Ghitulescu

unread,
Mar 4, 2020, 7:37:58 PM3/4/20
to bbedit

Hey!

Is there a way to jump to the matching bracket (in the row 76)

and back (to the row 35)?

Thanks!

Regards,
Vlad

Bildschirmfoto 2020-03-05 um 01.03.16.png

Roland Küffner

unread,
Mar 5, 2020, 1:13:23 PM3/5/20
to BBEdit Talk
Hi, Vlad

if you could live with two keystrokes, the sequence
cmd+b (for "View > Balance") and
arrow right (resp. left)
can move the insertion point around pretty quick.

Depending on the language you are using the commands "Go > Reveal Start/End" might also a good solution.

If you find yourself using two keystrokes all the time, there is of course the inevitable option of using Keyboard Maestro to shrink it down to one keystroke of your liking.

It should also be possible to do this with some simple applescript, but Catalina wrecked my quick and helpless attempt to achieve this with
tell application "System Events" to keystroke "B" using command down
tell application "System Events" to key code 124 -- for arrow right

-Roland

--
This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "sup...@barebones.com" rather than posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/B6504608-4353-44DE-9945-4EA3D303C8DD%40Ghitulescu.de.

Vlad Ghitulescu

unread,
Mar 5, 2020, 1:22:40 PM3/5/20
to BBEdit Talk

Hi, Roland!


Thanks a lot - it's good to know that I didn't miss something obvious (like I did with the select word!!! :-/) AND that it can be done with Keyboard Maestro.

I suppose that AppleScript would be speedier but - shame on me - I didn't make any progress with it… so Keyboard Maestro to the rescue!

Thanks again!


Regards,
Vlad

Vlad Ghitulescu

unread,
Mar 5, 2020, 1:59:17 PM3/5/20
to BBEdit Talk

Keyboard Maestro is not ideal for this.
Searching the matching bracket / paranthesis / etc. to the left works.
To the right…

a) when searching in

background-color: rgb(2, 99, 174);

with the cursor initially between ( and 2, it ends after ;

b) when searching in

.TabbedPanelsContent {
    overflow: visible !important;
    display: block !important;
    clear:both !important;
}

with the cursor initially after {, it ends after important;

and this even when CMD - B and right arrow (that is actually in the KBM-macro) put the cursor on the right spot.
I even tried putting a pause between CMD - B and the right arrow in the KBM-macro (that’s how clueless I was! :-) but it doesn’t change anything.

Regards,
Vlad

Reply all
Reply to author
Forward
0 new messages