0

When I select with the cursor a command/part of a command or any word I can't delete it in xfce4-terminal even a right click there is no option to delete. I can delete when I select one by one string. Can I change this behavior?

PS: OS Xubuntu 16.04.5

Mureinik
  • 3,974
  • 11
  • 28
  • 32

1 Answers1

0

While I do not have the technical expertise to explain exactly why this is, know that Terminal Emulation is, in a fashion, linear.

Meaning you hit a key and that key is translated into an action through the terminal. You hit a and an "a" appears. You hit backspace and you erase it. There are modified keys you can use which create effects. The mouse is not part of the equation here. It can do things external to the actual Terminal itself, such as copy and paste... but all that is, is batching the input of characters to occur all at once, again, in a linear fashion.

However, there are tricks to speeding up your efforts. If you navigate your cursor to the end of a word you want to delete? You can then hit Esc, which modifies the next key hit, and then hit Backspace, and it will delete that entire word for you.

Depending on the Terminal Emulator, if you want to jump back and forth quickly in the line of text (which you need to do, to move the cursor... since the only way to do that is to send instructions to the Terminal that you want to move the cursor), then there are generally Character Combinations to do so. In particular things like Alt+Left Arrow or Right Arrow... could be Ctrl or something else. If none of those work, the classics Alt+B for "Back one word" or Alt+F for "Forward one word" should work.

fixer1234
  • 27,064
  • 61
  • 75
  • 116
  • As an additional note, you can repeat keys with Esc then a number of repeats then the key you want to repeat. That key can be a Backspace or even, another Esc and then Backspace. For example: `Esc + 10 + Esc + Backspace` to delete 10 whole words. – EricDAltman Dec 08 '18 at 01:51
  • thanks, but is not working. I don't understand, do I have to type on terminal: Esc + 10 + Esc + Backspace ? I tried but the result > No command 'Esc' found. Or just hit Esc key and Backspace key ? – vladimir pavloski Dec 08 '18 at 20:25
  • Ah. Yes. These are Key Presses, not typed commands. – EricDAltman Dec 13 '18 at 19:52