Comment by em-bee
1 day ago
it's not fancy graphics that's missing from the terminal. but things like selection of text areas. (you can only select across the whole screen now, and if you are lucky you can select rectangles. but if i display text in multiple columns i'd like to be able to select one column at a time for example. this bites me every time when i use tmux or vim split windows. also filesystem navigation could be improved, multiline commandline editing is sorely lacking. fish tried that, but failed to make it work. clearly a limitation of the terminal.
so no, terminals are not a solved problem.
Zellij handles this, if you click and drag vertically within a pane the selection will stay in that pane even if there's a different pane to either side. Copy happens when you un-click. (Or at least it does this with Wezterm. I wouldn't be surprised if some terminals don't support whatever voodoo zellij is doing to alter the selection behavior).
You can't select arbitrary columns within a pane (like you can in vim) but if I'm understanding you that's not what you're after anyhow.
you read that right, i am only asking for the ability to select within one app window/pane instead of the selection going across the whole terminal. good to know that zellij can do that. and actually, i have seen vim being able to do that too, except the selection stayed within vim and was not going to the X11/wayland selection. since it turns out there is now an in-band method for terminal apps to write to the X11/wayland selection (as mentioned elsewhere in this discussion) it makes sense that this should solve the problem. and i am sure this is what zellij is using. now hopefully tmux can use it too.
Vim itself can select a column.
but it's non-trivial to copy that selection to the outside of vim to another app.
i can select a column in tmux too, using tmux commands, and then it's the same problem. i can't use that selection outside of tmux.
i simply want the GUI to be aware that there are multiple columns in the terminal and let me select text within one using the mouse and then copy that to a different window/app.
> it's non-trivial to copy that selection to the outside of vim to another app
A correctly compiled Vim will make the two X clipboards (“selections”) available as registers * (“primary”, i.e. the current selection, pasteable with the middle mouse button) and + (“secondary”, accessed with Ctrl-X/C/V) for both reading and writing. (I believe these are synonyms in graphical environments that don’t have two clipboards.) You can make one of them the default by adding
resp.
to your Vim configuration.
> i can select a column in tmux too, using tmux commands, and [...] i can't use that selection outside of tmux.
If you’re using Wayland on Linux, install wl-clipboard and put
in your tmux configuration, and mutatis mutandis for other (local) graphical environments. Watch out for cases where you’ve trained yourself to assume that the tmux selection and the desktop’s clipboard aren’t the same thing. (I don’t know how I’d synchronize things in the other direction, that seems non-trivial.)
2 replies →