For each completion

(JohnMoshakis) #1

Hi,

I think the for each completion could be improved slightly by being able to tab after the collection to after the do. I tab from the item i’m iterating over to after the in so I think it makes sense for tab to work after Ive entered the collection.

Cheers,
John

0 Likes

(marc hoffman) #2

Hmm. I’m. not sure if that would work well. If I leave a tab token there, I’ll need to be required to be cleaned up one way or the other; also it would conflict with pressing Space after do to add begin… I’ll play around.

0 Likes

(JohnMoshakis) #3

I didnt realize until recently that it did the begin as well. I like my begin on the next line, so I use the arrow keys to get to after the do and then I press enter.
If I press enter could you expand the token on the next line ?

0 Likes

(marc hoffman) #4

no, because then you could never type a for each clause without an begin/end block. the idea is you press space to get the begin (where it belongs, after the do) or enter to indent the next line and type a single statement for the loop (or any similar block, eg if/then, etc).

0 Likes