4 ms·
Reshaping Text
- siraben 4y agoOne issue I've encountered in the past when using text formatted with hard wrapping with non-technical people is that presenting the information usually goes fine, but when they want to edit the text a bunch of headaches ensue, since they don't use editors that reflow line endings or maintain spacing that would only be clearly visible in a monospace context.
- breck 4y agoDammit it's very hard to go a day without getting a very high ROI from reading HN.
- entelechy0 4y ago
- staplung 4y agoFWIW, if you could get almost the same effect from google docs (and presumably excel): if you cut/copy a grid of cells and paste it into something that only understands text (e.g. VScode) you'll get tab-delimited columns of text. I don't know if there's a way to get some of the niceties like left aligning but I've used google docs for this sort of trick many times. 1 5 9 2 6 10 3 7 11 4 8 12
- Waterluvian 4y ago> Note that the number used for the gutter size has to come immediately after the -g. You can’t leave a space between the option and its argument as you can with many other commands. I’ve seen this a few times. Why is that? Is there some syntactic ambiguity?
- asicsp 4y agoAnother option is `pr` command: $ seq 15 | pr -3ts 1 6 11 2 7 12 3 8 13 4 9 14 5 10 15 $ seq 15 | pr -3ats 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 One difference is that you'll need `6` instead of `14` for the example in the article. The `-j` option of `rs` is cool.
- tingletech 4y agomy old colleague at the California Digital Library John Kunze wrote `rs` when he was at Berkeley, as well as `jot` and `lam`. These were inspired by the APL operators. https://jkunze.github.io/biography.html https://jkunze.github.io/biography.html
- tpoacher 4y agoI'm not on my laptop atm ... How do these compare to the column command on linux?