I am using nano on files with long lines.
How could I scroll the nano window horizontally?
Ex:
┌────────────┐
|Lorem ipsum |dolor sit amet, consectetur adipiscing elit,
|sed do eiusm|od tempor incididunt ut labore et dolore magna aliqua.
|Dolor sed vi|verra ipsum nunc aliquet bibendum enim.
|In massa tem|por nec feugiat. Nunc aliquet bibendum enim facilisis gravida.
└────────────┘
I would like scrolling right side:
┌────────────┐
Lorem ipsum |dolor sit am|et, consectetur adipiscing elit,
sed do eiusm|od tempor in|cididunt ut labore et dolore magna aliqua.
Dolor sed vi|verra ipsum |nunc aliquet bibendum enim.
In massa tem|por nec feug|iat. Nunc aliquet bibendum enim facilisis gravida.
└────────────┘
Best Answer
I'm pretty sure you cannot do that in
nano
. The closest you could get would be line wrapping, precisely "soft wrapping": Esc+$.This will wrap lines so you could see them all on the screen.
Source: https://www.nano-editor.org/dist/v2.9/nano.html (search for --softwrap)
You could get this kind of behaviour with
vim
, though, the editor is more configurable. See: https://ddrscott.github.io/blog/2016/sidescroll/