kuroir wrote:I suggest that we use function keys for these kind of actions since they're going to be intensively used:
On TextMate you use F1 to Open and to Close Folds. You can use Super + Alt + [1..0] to close different levels of indentation. 0 being "Fold all", and 1 being "fold first level".
Just leaving this out there since it's something that works.
Edit: I see that super+alt+[1..X] are used to handle the splitting windows, which is ok. However F1 is a good folding option.
I used to love Notepad++'s code folding whereby you could (like TextMate) fold to given levels of a source file, but its shortcuts were alt+1, alt+2, alt+3 and I think shift+alt+1, etc. for unfold. (Which I know in ST2 are currently select tab and select layout respectively.) All I'd say is try to avoid the F keys if possible, because on some keyboards (e.g., my MacBook Pro) they have dual functions, and I'd hate to be pressing Fn every time I want to do an operation in ST2 I use with relative regularity.
Also, as the code folding idea is taken forward (as I'm sure it will be) it's be great to have gutter fold markers like most IDEs do. Would be nice to 'visually' fold rather than have to make a selection.
Finally, am I doing something wrong for folding? The only folding I can get to work is tag attribute folding with ctrl+k, ctrl+t. The ctrl+shift+[ and ctrl_shift_] don't appear to work for me, but maybe I'm using it incorrectly. Neither placing the caret next to a bracket nor selecting text invokes the function.