Sublime Forum

Go to the beginning/end of the code block

#1

Is it possible? I can’t find it.

Like to the closest { or } in C. Or to if/fi, do/done, case/esac, etc. in bash.

0 Likes

#2

Possible with https://packagecontrol.io/packages/BracketHighlighter by its builtin “brackets” rule: https://github.com/facelessuser/BracketHighlighter/blob/8b6bdb24cb5733f763941769ea1220244eef8acc/bh_core.sublime-settings#L566-L577

And then you can set prefered keybindings to jump/select around: https://github.com/jfcherng-sublime/ST-my-settings/blob/e90638d6a026f5ef3e160f00f1b799280702622e/Packages/User/Default%20(Windows).sublime-keymap#L297-L341

1 Like

#3

Looks promising. Thank you.

0 Likes

#4

Excellent. I mapped “Go to left/right bracket” to Ctrl+Up/Down and “Select to left/right bracket” to Ctrl+Shift+Up/Down. It does exactly what I want.

1 Like