20
8
These are the standard text editing keyboard shortcuts that I use constantly whenever editing text in, literally, any linux application other than terminal emulators:
- left+right arrows to move left+right
- ctrl+arrow to move an entire word
- home/end to move to start/end of line
- ctrl+c/ctrl+v to copy/paste [some terminals can use shift-ctrl-C/shift-ctrl-V; this is a good substitute]
- shift+arrow to highlight text
- shift+ctrl+arrow to highlight an entire word
I have never found a combination of shell plus terminal emulator that allows the last two items on this list, and it drives me nuts. Obviously terminal emulators support highlighting (the mouse can do it), and they support the use of the ctrl and shift keys as modifiers (they can be used to move the cursor an entire word, and to capitalize letters, respectively; [edit:] they can even be used together to copy/paste with shift-ctrl-C and shift-ctrl-V), so what is the issue preventing this functionality? I have several questions:
- Is this an issue with my terminal emulator, or with my shell (bash, though I'm willing to change)?
- Why do terminal emulators/shells not conform to this otherwise universal standard?
- If there is an actual reason, is it ancient and obsolete, or is it still relevant to a significant number of desktop linux users?
- Is there any kind of workaround?
- Is there some obscure program I can use that supports this?
- Is it feasible to modify the source of, say, gnome-terminal to support this?
I know text can be copied/pasted with the mouse, that's not what I'm asking about. I'm asking why I can't do these things with the keyboard in a terminal emulator.
Note that selecting text with the mouse does not change the cursor position. If you'd mix in text selection with entering regular commands on the keyboard, it'd just be really confusing beyond the boundaries of the command you just typed and not yet executed. Are you able to select text beyond the boundaries of the text box on a web page with the keyboard? Please also note that there are programs like screen that allow entering a different mode that has text selection for the entire terminal, but of course does no longer allow entering commands. – Daniel Beck – 2013-02-22T17:25:57.473
1Daniel: the Matlab console, for example, is a CLI that allows text highlighting with the keyboard. It works perfectly in my experience; it allows selection beyond the current not-yet-executed command if desired, personally I have little use for that. – monguin – 2013-02-22T17:38:14.020
see also http://stackoverflow.com/questions/1536757/selecting-text-in-terminal-without-using-the-mouse
– Nikos Alexandris – 2013-07-05T08:02:04.037and here as well http://stackoverflow.com/q/312213/1172302
– Nikos Alexandris – 2013-07-05T08:03:00.370