nano editor line breaks
Asked Answered
T

2

11

I am trying to learn nano installed on my server (ubuntu 1204), but the problem is whenever I open a file in nano editor it opens the file (say a shell script) as one big line rather than with line breaks which fit the screen.

Is it possible to open files with linebreaks in nano? I have tried googling this problem, but couldn’t find anything which works.

Any help would be much appreciated.

Tound answered 7/1, 2013 at 1:0 Comment(5)
What do you use to write these shell scripts?Parrett
And does the file show up as line1\nline2 or just line1line2?Parrett
@Blender: no, it has this irritating $ sign at the end of the screen..Tound
ok I solved it - hitting Ctrl+J shows the lines "broken"Tound
the q belongs on askubuntu.comNupercaine
T
11

Ctrl+J and the lines "broken".

Tound answered 7/1, 2013 at 1:21 Comment(0)
I
1

Toggle soft line-wrap in Nano:

Alt+s

("Alt" key is the same as "Meta" key on Linux.)

Display a list of keyboard commands:

Ctrl+g

Imprescriptible answered 8/1 at 15:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.