Delete total line in nano?

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.

0

2 Answers

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

1

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.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like