3 ms·
ST has code folding, but I don't think it has special automatic code folding when using Goto Definition?
by frou_dh 2y ago
ST has code folding, but I don't think it has special automatic code folding when using Goto Definition?
- righthand 2y agoThat specific part of code folding is pure preference. I would rather my editor not just fold things on GoTo Definition. GoTo Definition already takes me to what I need to see. I use code folding to minimize large chunks of something in the way. Not to unload my visual workspace on every jump. Folding on specific commands means I’d have to unfold sometimes, extra commands.
- frou_dh 2y agoIt being preference (recommended default: off) was also covered in the article :/
- righthand 2y agoSo then not really a missing editor feature if it’s a small opt-in preference. The author assumes everyone wants this but then it will be entirely undiscoverable from the base level UI. Also, while not automatic, if I use GoTo in sublime text, then Edit->Code Fold-> Fold All, it will fold everything I have not focused on, all the way around my code selection or indent level. Seems like you could cobble together a simple plugin or shortcut to handle the expected behavior. Keys: Cmd+r, goto, cmd+k cmd+1 fold all