The line-range argument currently only supports a single range of lines, e.g. line-range: (2, 4) selects lines 2 and 3. It would be very nice if multiple ranges could be supported, and ideally a separator indicating skipped lines; this corresponds to the ranges and smart-skip/skips feature of codly.
As for the API, I think the line-range parameter could support both modes: if the parameter is an array, it either contains two numbers (single range like now) or arrays and dicts (multiple ranges)—no ambiguity.
(separate but kinda relate to this feature request: I wonder how you feel about inclusive ranges; specifying (2, 3) to select lines two and three feels more natural, even though it's less common in IT. In crudo, I even use strings for that purpose, formatted similarly to how page ranges are specified when printing, e.g. "-2, 4-5, 7, 9-" for pages up to 2, then 4, 5, 7, and then pages starting at 9)
The
line-rangeargument currently only supports a single range of lines, e.g.line-range: (2, 4)selects lines 2 and 3. It would be very nice if multiple ranges could be supported, and ideally a separator indicating skipped lines; this corresponds to therangesandsmart-skip/skipsfeature of codly.As for the API, I think the
line-rangeparameter could support both modes: if the parameter is an array, it either contains two numbers (single range like now) or arrays and dicts (multiple ranges)—no ambiguity.(separate but kinda relate to this feature request: I wonder how you feel about inclusive ranges; specifying
(2, 3)to select lines two and three feels more natural, even though it's less common in IT. In crudo, I even use strings for that purpose, formatted similarly to how page ranges are specified when printing, e.g."-2, 4-5, 7, 9-"for pages up to 2, then 4, 5, 7, and then pages starting at 9)