69

some times while I am editing my files with nano I am facing difficulty while deleting some big line, I need to hold Del key for long time.

is there any shortcut I can found to delete the total line at a time ?

I have checked the man-page , still no use.

Thank you.

102

You can use Ctrl+K to delete a line.

But strictly speaking Ctrl+k does not delete lines permanently. The most recent set of deletions are stored in a buffer. These lines may be re-inserted at the current cursor location using Ctrl+U. You can use this to cut and paste.

Here you can find some useful shortcuts of nano

  • checked and verified. wait for 6 min I will accept the answer.Thank you BTW. – rɑːdʒɑ Dec 15 '13 at 5:18
4

It's true that man nano is quite brief. However, if you have a "default" nano, you should see a small help menu at the bottom of the screen like this:

nano help

If you don't see such a menu, it is possible that you need to go into /etc/nanorc and look for something like this:

## Don't display the helpful shortcut lists at the bottom of the screen.
# set nohelp

Uncommenting the second line causes the menu to be hidden. You may prefer to copy /etc/nanorc to your home folder as .nanorc and edit that copy for user-specific modifications.

You can also access nano's built-in help (and shortcuts) by pressing Ctrl+G at any time.

  • It's true that nano shows some of the shortcuts, but it's unclear what 'Cut Text' means. – randomperson Mar 2 '18 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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