Commenting out blocks

(Jean Christophe Helary) #1

That’s a feature request (do we have a category/tag for that?)

It would be amazing if commenting the selection generated foldable blocks with:
rather than just comment out with

That way we comment out, fold away the stuff, write some more code, etc.

(Ed Stockly) #2

You can do that with clippings!

(Ed Stockly) #3
	[[selected-lines:block comment]]

I have this in a clipping named “Block Comment” and it works exactly as you describe. (I don’t remember if this is one I added or provided, so you may actually already have it in your clippings)

(Shane Stanley) #4

It’s the one called block comment.

The reason commenting is not done this way by default is that there are some quirks to how AppleScript interprets other block characters within such block comments.

(Phil Stokes) #5


And for extra-goodness, you can hotkey it in the key bindings.