4 ms·
Would it be reasonable to have an editor that ran this every time you resize your editor window? I like to have multiple windows on screen at once, and will of
by robbrown451 10y ago
Would it be reasonable to have an editor that ran this every time you resize your editor window?
I like to have multiple windows on screen at once, and will often adjust them to make best use of screen real estate. I tend let it soft-wrap the text, but I'd love it if it would do soft-wrapping... prettier.
- gcommer 10y agoThat sounds like an awesome idea (given that display is totally separated from the format-on-save anyways). I got a quick feel for it with this in a terminal: watch -n 0.1 'prettier --print-width $COLUMNS index.js' ... and unfortunately didn't really like it. Maybe in a pinch, but it still ends up feeling really cramped trying to read column in low-width terminals. At the other extreme (having the terminal be the only window on a 21:9 ultrawide), some of the lines get so long that you'd want a max anyways.
- robbrown451 10y agoI'm playing with this in CodeMirror (browser based code editor) which talks to a local node.js server, and I think it looks really good, as long as you have lower and upper limits as you suggest. Biggest concern is stuff like the undo history. I think it just needs a "formatting" button or even background process when you leave it idle for a bit. Might be better to run on the browser but haven't bothered trying yet.