aheze / Multiliner

An Xcode source extension to expand lengthy lines.
https://twitter.com/aheze0/status/1541578738239885312
MIT License
827 stars 23 forks source link

Idea: Automatically determine scope? #2

Closed calimarkus closed 2 years ago

calimarkus commented 2 years ago

I just saw this:

https://github.com/aheze/Multiliner/blob/150c4a99e37470c49eb3b2b6e7a6417946ba9f40/Sources/MultilinerExtension/SourceEditorCommand.swift#L21

It'd be cool, if you could only place the cursor in a scope and then it figures out the smallest matching scope that can apply?

aheze commented 2 years ago

Hmm that would be nice. Maybe a while loop or something?

calimarkus commented 2 years ago

Actually the command already achieves what I was thinking of. You only need to put the cursor and run the command. I wrongly assumed at first that you need to select the exact selection first.

What did you think of?