Reputation: 959
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.
Upvotes: 28
Views: 22478
Reputation: 45
Setup is Nano editor on Linux (remote server) connected/controlled through SSH from a Mac. For quick navigation, use scroll wheel/trackpad and following shortcuts.
Jump to line x:
ctrl + -
Jump 1 word forward:
ctrl + space
Jump to beginning of line:
ctrl + a
Jump to end of line:
ctrl + e
Upvotes: 0
Reputation: 5848
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
Upvotes: 48