atom-supercollider icon indicating copy to clipboard operation
atom-supercollider copied to clipboard

Selection by parentheses

Open vanderaalle opened this issue 11 years ago • 7 comments

(sorry, maybe it's me). One of the traditional SC feature is that you can select blocks of code surrounded by parentheses. Is this possible? I haven't been able to do it

vanderaalle avatar Jul 21 '14 10:07 vanderaalle

ctrl-cmd M https://github.com/atom/bracket-matcher

but its not ideal yet. it only selects the next level up.

I am looking for some package that can find the largest () scope

possibly there is a way to call the functions in bracket-matcher and step upwards till its the top level.

maybe: https://atom.io/packages/paredit

which is amazing on emacs, but is still incomplete here.

crucialfelix avatar Jul 21 '14 11:07 crucialfelix

thanks a lot, I inspected keymap file but wasn't able to find it. I'm also not able to clean post window (sorry if these are dumb questions, you can take me as the 0-level user... :) )

vanderaalle avatar Jul 21 '14 11:07 vanderaalle

dumb questions are the best ones. those are the ones the developer thinks he is too smart to ask. but he's wrong.

I didn't assign a key command to post window yet.

cmd-shift-C is most likely but it conflicts with Color Picker, but now I'm thinking that doesn't matter so much.

Atom needs key commands limited by scope. They will add this soon.

crucialfelix avatar Jul 21 '14 11:07 crucialfelix

According to the docs regions are defined by an open and close parenthesis, each on its own line. Maybe you could just do a linear search up and down from the evaluation line looking for a line that's only a single open or close parenthesis? Unless the file is huge (probably not very likely for a SC file) I imagine it would be fast enough.

ssfrr avatar Apr 23 '16 14:04 ssfrr

I was hoping for some atom library that provides that functionality. I would rather concentrate on supercollider only features.

Even if I can find something to copy and paste or some npm library that does it, that would help.

Maybe its not so hard to do. I'm still waiting for a good Par Edit for Atom

https://www.emacswiki.org/emacs/ParEdit

crucialfelix avatar Apr 23 '16 17:04 crucialfelix

this works: https://github.com/juliangruber/balanced-match

crucialfelix avatar Apr 27 '16 13:04 crucialfelix

Any hope on getting this feature? Would be awesome

diegovdc avatar Jan 29 '19 19:01 diegovdc