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

up vote 0 down vote accepted

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.

  • 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 8 at 1: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 8 at 20:25
  • Ah. Yes. These are Key Presses, not typed commands. – EricDAltman Dec 13 at 19:52

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.