1

I am using nano editor for the first time. I know that CTRL + K will delete an entire line. But I am unable to understand how to delete a selected portion (selected using mouse) of the the text. is there any special command for the same?
I am using this under Ubuntu 12.04

1 Answer 1

3

Start nano with the -m option, i.e.

nano -m my_file

This enables mouse support.

Now a a double mouse click places a "mark" at the point where the cursor is located, and "Mark set" will appear on the screen. To delete a multi-line piece of text, place a mark at the beginning of the text you want to delete, and a second mark at the end of the text to be deleted. Now Control+K will delete the "marked" text.

1
  • very useful answer!
    – Allexj
    Commented Nov 27, 2023 at 9:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .