top | item 40488541

(no title)

chalupaman | 1 year ago

At least in the terminals I’ve used so far, holding down Ctrl causes you select the displayed form, not the verbatim form of what you’re highlighting. That is, if you’re in vim looking at a file with 10 long lines, selecting them this way will only select the portion that fits onto your screen, not the entire lines. And if your editor visually wraps them so they do fit on the screen, selecting this way will introduce unwanted line breaks, such that copying 10 lines and pasting can create 23 lines.

The iTerm2 feature being discussed means that selecting works the same way it does for graphical programs like Gedit or Pycharm or Word — if you select 10 lines you select 10 lines and your window size, font size and visual wrap setting don’t factor into it, and when you paste, you paste what you copied as it was. I would say this is the intuitive and reasonable behavior, but it’s one that is not simple to implement. A visual word wrap should be a purely visual thing and s back to back Cut and Paste should result in nothing changing.

discuss

order

iforgotpassword|1 year ago

Good point, didn't think of that, probably not encountering that case often enough in my workflow.