You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I'm handling a lot of if statements or switch cases, I often find myself either not knowing which function I'm in when dealing with others' codebases (outer), or which if/switch statement I'm in (inner). I'd love to see a feature to remove the context in the center, leaving only the appropriate number of inner and outer context lines, depending on how nested the code is, or how many if/switch statements there are and obviously the value of max_lines.
The text was updated successfully, but these errors were encountered:
I would also love to see this feature, or have it be the default for the 'inner' trim behavior.
To be honest, I feel a bit "lied to" in the inner trim mode, because it strongly suggests I'm in an if-else / switch branch that I actually am not. My preferred behavior would be to have the "prior cases" of if-elses and switches trimmed first, and only resort to pruning scope context afterward (with the direction depending on your inner / outer setting).
As-is, I'm forced to use max_lines: 1 with the inner mode, because I can be reasonably sure it will be a function context that will not have had the most relevant syntax chopped off already.
When I'm handling a lot of
if
statements orswitch
cases, I often find myself either not knowing which function I'm in when dealing with others' codebases (outer), or whichif
/switch
statement I'm in (inner). I'd love to see a feature to remove the context in the center, leaving only the appropriate number of inner and outer context lines, depending on how nested the code is, or how manyif
/switch
statements there are and obviously the value ofmax_lines
.The text was updated successfully, but these errors were encountered: