Nano Editor: Delete to the end of the file

nano

When using GNU's Nano Editor, is it possible to delete from the actual cursor position to the end of the text file?

My workaround for now: keep pressed CtrlK (the delete full line hotkey). But this method is not so confortable on slow remote connections (telnet, SSH… etc).

Best Answer

According to Nano Keyboard Commands, you can do this with AltT:

M-T    Cut from the cursor position to the end of the file

where the M is "alt" (referring to the ESC key). In the documentation, "cut" is another way of saying delete or remove, e.g.,

^K     Cut the current line and store it in the cutbuffer
Related Question