Closed plutonium-239 closed 1 month ago
Thanks for the suggestion! This makes sense and should be feasible, though I'm wondering if this should be a key binding or something that should happen automatically.
Ideally, csvlens should take up full width if that doesn't reduce the number of columns that can be displayed. The current column widths heuristic optimizes for CSV with many columns, but probably not so much for CSV with few columns and long text.
You're right, but I leave that decision up to you
As for the current column width heuristic, is this the function of interest?
Yes, that is the function that determines column widths.
Main branch should now handle this automatically. For example,
Before:
After:
Let me know if it works in your case.
Can you make a patch/minor release with the latest code? (or is there one planned soon?) I don't have cargo to build from source and am feeling a bit lazy😅(low on storage)
Yes, I plan to make a release in about a week or so.
In the mean time, you can check out this CI run which builds the binaries with this change included: https://github.com/YS-L/csvlens/actions/runs/10019417514?pr=94.
Feel free to download the binary for your platform and try out. Appreciate any feedback!
It works!
In #11, it was discussed that columns don't take up full-width by default, and that's fine. However, I would love the addition of a keybind that automatically expands the table (could be multiple truncated columns) to full-width. Take this example use case:
Is something like this feasible?