Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nano keyboard shortcut to go through line faster?

Tags:

Is there an shortcut in nano for moving through a line faster? I have some log files with gigantic lines and getting to the middle of them is awful.

I know I could use a different text editor that doesn't have this particular problem (less will wrap lines), but I'm used to nano and I like a lot of its other features.

like image 801
quantka Avatar asked Jun 19 '13 21:06

quantka


People also ask

How do you go to line in nano editor?

After typing the shortcut, nano will let you to enter the line you wanna jump to, type in the line number, then press ENTER. This is misleading at best: the actual shortcut is 'Ctrl + '.

What is the M key in nano?

NOTE: Any command prefixed with a caret symbol (^) means to use the Ctrl key (e.g., ^G means to press the Ctrl+G keys at the same time). Any command prefixed with the letter M means to press the Alt key (e.g., M-R means to press the Alt+R keys together). Most Helpful!


1 Answers

Here are the shortcuts for moving through a line in nano.

Use these to go faster through a line:

ctrl + space move one word forward in a line.

alt + space move one word backwards in a line.

Other line shortcuts:

ctrl + f move one character forward in a line.

ctrl + b move one character backwards in a line.

ctrl + a move to the beginning of a line.

ctrl + e move to the end of a line

To move to a specific line use ctrl + _. You may want to check out more Nano Keyboard Commands

like image 190
Sven Rojek Avatar answered Sep 20 '22 09:09

Sven Rojek