Long line wrapping in Nano












51














When editing an authorised_keys file in Nano, I want to wrap long lines so that I can see the end of the lines (i.e tell whose key it is). Essentially I want it to look like the output of cat authorised_keys



So, I hit Esc + L which is the meta key for enabling long line wrapping on my platform and I see the message to say long line wrapping has been enabled but the lines do not wrap as I expect.



I'm using Terminal on OSX 10.8.5










share|improve this question



























    51














    When editing an authorised_keys file in Nano, I want to wrap long lines so that I can see the end of the lines (i.e tell whose key it is). Essentially I want it to look like the output of cat authorised_keys



    So, I hit Esc + L which is the meta key for enabling long line wrapping on my platform and I see the message to say long line wrapping has been enabled but the lines do not wrap as I expect.



    I'm using Terminal on OSX 10.8.5










    share|improve this question

























      51












      51








      51


      16





      When editing an authorised_keys file in Nano, I want to wrap long lines so that I can see the end of the lines (i.e tell whose key it is). Essentially I want it to look like the output of cat authorised_keys



      So, I hit Esc + L which is the meta key for enabling long line wrapping on my platform and I see the message to say long line wrapping has been enabled but the lines do not wrap as I expect.



      I'm using Terminal on OSX 10.8.5










      share|improve this question













      When editing an authorised_keys file in Nano, I want to wrap long lines so that I can see the end of the lines (i.e tell whose key it is). Essentially I want it to look like the output of cat authorised_keys



      So, I hit Esc + L which is the meta key for enabling long line wrapping on my platform and I see the message to say long line wrapping has been enabled but the lines do not wrap as I expect.



      I'm using Terminal on OSX 10.8.5







      ubuntu nano






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 2 '14 at 16:23









      codecowboy

      99051228




      99051228






















          7 Answers
          7






          active

          oldest

          votes


















          69














          To see the word wrapping style you described, use nano's "soft wrapping": Esc+$.


          The Esc+L command you (and everyone) tried does "hard wrapping."



          Note on keystroke notation - if you are new to Linux or nano, the notation Esc+$ does not mean hold down escape while pressing $. It means press and release Esc and then press $. The full key press sequence then is Esc, Shift+4.



          Note on softwrap and formatting mistakes - Further, and especially if you are a new user to nano, be careful of softwrap. If you are editing a configuration file or something else that is sensitive to newlines or indents, formatting mistakes can be made. Until you get comfortable with softwrap’s behaviors, I suggest doing a quick check with softwrap off (do the key sequence again) before saving.



          Source: https://www.nano-editor.org/dist/v2.9/nano.html (search for --softwrap)



          nano linewrap






          share|improve this answer



















          • 2




            This was my biggest pet peeve in nano. Thanks for sorting this out.
            – user208145
            Mar 10 '17 at 5:36





















          14














          Just searched for nano line wrapping and this came high in results, so I'll post my findings for GNU nano 2.2.6 on the Raspberry Pi, Raspbian GNU/Linux 7: Esc+L gave me the same message; but for the line wrapping to take effect I had to modify the line. As soon as I typed another character on the long line, wrapping kicked in.






          share|improve this answer































            13














            I'm reading the replies here and need to set this straight!



            Nano supports two different forms of line wrapping, and it can be essential to know the difference!



            First, the Meta key below is often the Alt key, but not necessarily.





            • Soft line wrapping is activated with Meta-$. Wraps lines without inserting line break characters into the file. That is, the effect is purely visual.


            • Hard line wrapping is activated with Meta-L. Wraps lines by inserting line breaks into the file. The file is physically changed.


            So if you activate it in a file where wraps are meaningful (configuration files, programming languages, scripts), you basically never want the hard line wraps or it'll change the meaning of the code.



            Also, you'd have found these shortcuts with ^G (i.e. Ctrl-G) in Nano.






            share|improve this answer



















            • 3




              Meta $ = Alt+Shift+4
              – JamesTheAwesomeDude
              Apr 25 '17 at 1:13





















            5














            Setting a short alias for your nano editor also works well.
            I normally use:



             alias  e='nano -$cwS'
            alias se='sudo nano -$cwS'


            (Set these in ~/.bashrc (or .bash_aliases on some systems) or your favorite shell startup)



            Flags/Options used:



            $ = Enable soft-wrapping of lines (escaped using backslash)
            c = Show constant cursor position (at bottom)
            w = Disable any 'hard wrapping'
            S = Smooth scrolling



            And (as already mentioned) once in editor, use Esc, $ to toggle soft-wrapping ON/OFF.






            share|improve this answer































              2














              Open the nanorc generally at ~/.nanorc or /etc/nanorc, comment out the line



              set nowrap


              And uncomment line



              set softwrap


              Hope it helps.






              share|improve this answer





























                1














                Mac users be advised the version of Nano shipped with High Sierra (v2.0.6) or earlier doesn't support soft line wrapping as described here. You'll get an unknown command error. v2.2 is the earliest version with mention of soft wrap in the man pages. So don't spend an hour trying all these solutions like I did.



                Esc+L does work as expected.






                share|improve this answer





























                  0














                  The configuration settings for nano 1, nano 2, and nano 3 are different.



                  On nano 1, you only have the set nowrap setting which disables all wrapping.



                  On nano 2, set softwrap enables softwrapping and disables hardwrapping.



                  On nano 3, set softwrap is ignored and nano continues to hardwrap unless you also set set nowrap.



                  On nano 2 and 3, no set nowrap only disables hardwrapping! and on nano 3 you MUST use it if you want softwrapping.



                  So if you want text wrapping for long lines that doesn't break your configuration files (softwrapping only), this works for versions 2 and 3: ~/.nanorc



                  set nowrap
                  set softwrap




                  share








                  New contributor




                  x0a is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.


















                    Your Answer








                    StackExchange.ready(function() {
                    var channelOptions = {
                    tags: "".split(" "),
                    id: "106"
                    };
                    initTagRenderer("".split(" "), "".split(" "), channelOptions);

                    StackExchange.using("externalEditor", function() {
                    // Have to fire editor after snippets, if snippets enabled
                    if (StackExchange.settings.snippets.snippetsEnabled) {
                    StackExchange.using("snippets", function() {
                    createEditor();
                    });
                    }
                    else {
                    createEditor();
                    }
                    });

                    function createEditor() {
                    StackExchange.prepareEditor({
                    heartbeatType: 'answer',
                    autoActivateHeartbeat: false,
                    convertImagesToLinks: false,
                    noModals: true,
                    showLowRepImageUploadWarning: true,
                    reputationToPostImages: null,
                    bindNavPrevention: true,
                    postfix: "",
                    imageUploader: {
                    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                    allowUrls: true
                    },
                    onDemand: true,
                    discardSelector: ".discard-answer"
                    ,immediatelyShowMarkdownHelp:true
                    });


                    }
                    });














                    draft saved

                    draft discarded


















                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f122795%2flong-line-wrapping-in-nano%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown

























                    7 Answers
                    7






                    active

                    oldest

                    votes








                    7 Answers
                    7






                    active

                    oldest

                    votes









                    active

                    oldest

                    votes






                    active

                    oldest

                    votes









                    69














                    To see the word wrapping style you described, use nano's "soft wrapping": Esc+$.


                    The Esc+L command you (and everyone) tried does "hard wrapping."



                    Note on keystroke notation - if you are new to Linux or nano, the notation Esc+$ does not mean hold down escape while pressing $. It means press and release Esc and then press $. The full key press sequence then is Esc, Shift+4.



                    Note on softwrap and formatting mistakes - Further, and especially if you are a new user to nano, be careful of softwrap. If you are editing a configuration file or something else that is sensitive to newlines or indents, formatting mistakes can be made. Until you get comfortable with softwrap’s behaviors, I suggest doing a quick check with softwrap off (do the key sequence again) before saving.



                    Source: https://www.nano-editor.org/dist/v2.9/nano.html (search for --softwrap)



                    nano linewrap






                    share|improve this answer



















                    • 2




                      This was my biggest pet peeve in nano. Thanks for sorting this out.
                      – user208145
                      Mar 10 '17 at 5:36


















                    69














                    To see the word wrapping style you described, use nano's "soft wrapping": Esc+$.


                    The Esc+L command you (and everyone) tried does "hard wrapping."



                    Note on keystroke notation - if you are new to Linux or nano, the notation Esc+$ does not mean hold down escape while pressing $. It means press and release Esc and then press $. The full key press sequence then is Esc, Shift+4.



                    Note on softwrap and formatting mistakes - Further, and especially if you are a new user to nano, be careful of softwrap. If you are editing a configuration file or something else that is sensitive to newlines or indents, formatting mistakes can be made. Until you get comfortable with softwrap’s behaviors, I suggest doing a quick check with softwrap off (do the key sequence again) before saving.



                    Source: https://www.nano-editor.org/dist/v2.9/nano.html (search for --softwrap)



                    nano linewrap






                    share|improve this answer



















                    • 2




                      This was my biggest pet peeve in nano. Thanks for sorting this out.
                      – user208145
                      Mar 10 '17 at 5:36
















                    69












                    69








                    69






                    To see the word wrapping style you described, use nano's "soft wrapping": Esc+$.


                    The Esc+L command you (and everyone) tried does "hard wrapping."



                    Note on keystroke notation - if you are new to Linux or nano, the notation Esc+$ does not mean hold down escape while pressing $. It means press and release Esc and then press $. The full key press sequence then is Esc, Shift+4.



                    Note on softwrap and formatting mistakes - Further, and especially if you are a new user to nano, be careful of softwrap. If you are editing a configuration file or something else that is sensitive to newlines or indents, formatting mistakes can be made. Until you get comfortable with softwrap’s behaviors, I suggest doing a quick check with softwrap off (do the key sequence again) before saving.



                    Source: https://www.nano-editor.org/dist/v2.9/nano.html (search for --softwrap)



                    nano linewrap






                    share|improve this answer














                    To see the word wrapping style you described, use nano's "soft wrapping": Esc+$.


                    The Esc+L command you (and everyone) tried does "hard wrapping."



                    Note on keystroke notation - if you are new to Linux or nano, the notation Esc+$ does not mean hold down escape while pressing $. It means press and release Esc and then press $. The full key press sequence then is Esc, Shift+4.



                    Note on softwrap and formatting mistakes - Further, and especially if you are a new user to nano, be careful of softwrap. If you are editing a configuration file or something else that is sensitive to newlines or indents, formatting mistakes can be made. Until you get comfortable with softwrap’s behaviors, I suggest doing a quick check with softwrap off (do the key sequence again) before saving.



                    Source: https://www.nano-editor.org/dist/v2.9/nano.html (search for --softwrap)



                    nano linewrap







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Nov 18 at 14:19

























                    answered Jul 23 '15 at 18:14









                    coreyt

                    80664




                    80664








                    • 2




                      This was my biggest pet peeve in nano. Thanks for sorting this out.
                      – user208145
                      Mar 10 '17 at 5:36
















                    • 2




                      This was my biggest pet peeve in nano. Thanks for sorting this out.
                      – user208145
                      Mar 10 '17 at 5:36










                    2




                    2




                    This was my biggest pet peeve in nano. Thanks for sorting this out.
                    – user208145
                    Mar 10 '17 at 5:36






                    This was my biggest pet peeve in nano. Thanks for sorting this out.
                    – user208145
                    Mar 10 '17 at 5:36















                    14














                    Just searched for nano line wrapping and this came high in results, so I'll post my findings for GNU nano 2.2.6 on the Raspberry Pi, Raspbian GNU/Linux 7: Esc+L gave me the same message; but for the line wrapping to take effect I had to modify the line. As soon as I typed another character on the long line, wrapping kicked in.






                    share|improve this answer




























                      14














                      Just searched for nano line wrapping and this came high in results, so I'll post my findings for GNU nano 2.2.6 on the Raspberry Pi, Raspbian GNU/Linux 7: Esc+L gave me the same message; but for the line wrapping to take effect I had to modify the line. As soon as I typed another character on the long line, wrapping kicked in.






                      share|improve this answer


























                        14












                        14








                        14






                        Just searched for nano line wrapping and this came high in results, so I'll post my findings for GNU nano 2.2.6 on the Raspberry Pi, Raspbian GNU/Linux 7: Esc+L gave me the same message; but for the line wrapping to take effect I had to modify the line. As soon as I typed another character on the long line, wrapping kicked in.






                        share|improve this answer














                        Just searched for nano line wrapping and this came high in results, so I'll post my findings for GNU nano 2.2.6 on the Raspberry Pi, Raspbian GNU/Linux 7: Esc+L gave me the same message; but for the line wrapping to take effect I had to modify the line. As soon as I typed another character on the long line, wrapping kicked in.







                        share|improve this answer














                        share|improve this answer



                        share|improve this answer








                        edited Nov 17 '14 at 13:27









                        slm

                        247k66508675




                        247k66508675










                        answered Nov 17 '14 at 12:31









                        chainsawmascara

                        14114




                        14114























                            13














                            I'm reading the replies here and need to set this straight!



                            Nano supports two different forms of line wrapping, and it can be essential to know the difference!



                            First, the Meta key below is often the Alt key, but not necessarily.





                            • Soft line wrapping is activated with Meta-$. Wraps lines without inserting line break characters into the file. That is, the effect is purely visual.


                            • Hard line wrapping is activated with Meta-L. Wraps lines by inserting line breaks into the file. The file is physically changed.


                            So if you activate it in a file where wraps are meaningful (configuration files, programming languages, scripts), you basically never want the hard line wraps or it'll change the meaning of the code.



                            Also, you'd have found these shortcuts with ^G (i.e. Ctrl-G) in Nano.






                            share|improve this answer



















                            • 3




                              Meta $ = Alt+Shift+4
                              – JamesTheAwesomeDude
                              Apr 25 '17 at 1:13


















                            13














                            I'm reading the replies here and need to set this straight!



                            Nano supports two different forms of line wrapping, and it can be essential to know the difference!



                            First, the Meta key below is often the Alt key, but not necessarily.





                            • Soft line wrapping is activated with Meta-$. Wraps lines without inserting line break characters into the file. That is, the effect is purely visual.


                            • Hard line wrapping is activated with Meta-L. Wraps lines by inserting line breaks into the file. The file is physically changed.


                            So if you activate it in a file where wraps are meaningful (configuration files, programming languages, scripts), you basically never want the hard line wraps or it'll change the meaning of the code.



                            Also, you'd have found these shortcuts with ^G (i.e. Ctrl-G) in Nano.






                            share|improve this answer



















                            • 3




                              Meta $ = Alt+Shift+4
                              – JamesTheAwesomeDude
                              Apr 25 '17 at 1:13
















                            13












                            13








                            13






                            I'm reading the replies here and need to set this straight!



                            Nano supports two different forms of line wrapping, and it can be essential to know the difference!



                            First, the Meta key below is often the Alt key, but not necessarily.





                            • Soft line wrapping is activated with Meta-$. Wraps lines without inserting line break characters into the file. That is, the effect is purely visual.


                            • Hard line wrapping is activated with Meta-L. Wraps lines by inserting line breaks into the file. The file is physically changed.


                            So if you activate it in a file where wraps are meaningful (configuration files, programming languages, scripts), you basically never want the hard line wraps or it'll change the meaning of the code.



                            Also, you'd have found these shortcuts with ^G (i.e. Ctrl-G) in Nano.






                            share|improve this answer














                            I'm reading the replies here and need to set this straight!



                            Nano supports two different forms of line wrapping, and it can be essential to know the difference!



                            First, the Meta key below is often the Alt key, but not necessarily.





                            • Soft line wrapping is activated with Meta-$. Wraps lines without inserting line break characters into the file. That is, the effect is purely visual.


                            • Hard line wrapping is activated with Meta-L. Wraps lines by inserting line breaks into the file. The file is physically changed.


                            So if you activate it in a file where wraps are meaningful (configuration files, programming languages, scripts), you basically never want the hard line wraps or it'll change the meaning of the code.



                            Also, you'd have found these shortcuts with ^G (i.e. Ctrl-G) in Nano.







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Mar 4 '17 at 12:39









                            Thomas

                            3,73661225




                            3,73661225










                            answered Mar 4 '17 at 12:33









                            Jonas

                            23123




                            23123








                            • 3




                              Meta $ = Alt+Shift+4
                              – JamesTheAwesomeDude
                              Apr 25 '17 at 1:13
















                            • 3




                              Meta $ = Alt+Shift+4
                              – JamesTheAwesomeDude
                              Apr 25 '17 at 1:13










                            3




                            3




                            Meta $ = Alt+Shift+4
                            – JamesTheAwesomeDude
                            Apr 25 '17 at 1:13






                            Meta $ = Alt+Shift+4
                            – JamesTheAwesomeDude
                            Apr 25 '17 at 1:13













                            5














                            Setting a short alias for your nano editor also works well.
                            I normally use:



                             alias  e='nano -$cwS'
                            alias se='sudo nano -$cwS'


                            (Set these in ~/.bashrc (or .bash_aliases on some systems) or your favorite shell startup)



                            Flags/Options used:



                            $ = Enable soft-wrapping of lines (escaped using backslash)
                            c = Show constant cursor position (at bottom)
                            w = Disable any 'hard wrapping'
                            S = Smooth scrolling



                            And (as already mentioned) once in editor, use Esc, $ to toggle soft-wrapping ON/OFF.






                            share|improve this answer




























                              5














                              Setting a short alias for your nano editor also works well.
                              I normally use:



                               alias  e='nano -$cwS'
                              alias se='sudo nano -$cwS'


                              (Set these in ~/.bashrc (or .bash_aliases on some systems) or your favorite shell startup)



                              Flags/Options used:



                              $ = Enable soft-wrapping of lines (escaped using backslash)
                              c = Show constant cursor position (at bottom)
                              w = Disable any 'hard wrapping'
                              S = Smooth scrolling



                              And (as already mentioned) once in editor, use Esc, $ to toggle soft-wrapping ON/OFF.






                              share|improve this answer


























                                5












                                5








                                5






                                Setting a short alias for your nano editor also works well.
                                I normally use:



                                 alias  e='nano -$cwS'
                                alias se='sudo nano -$cwS'


                                (Set these in ~/.bashrc (or .bash_aliases on some systems) or your favorite shell startup)



                                Flags/Options used:



                                $ = Enable soft-wrapping of lines (escaped using backslash)
                                c = Show constant cursor position (at bottom)
                                w = Disable any 'hard wrapping'
                                S = Smooth scrolling



                                And (as already mentioned) once in editor, use Esc, $ to toggle soft-wrapping ON/OFF.






                                share|improve this answer














                                Setting a short alias for your nano editor also works well.
                                I normally use:



                                 alias  e='nano -$cwS'
                                alias se='sudo nano -$cwS'


                                (Set these in ~/.bashrc (or .bash_aliases on some systems) or your favorite shell startup)



                                Flags/Options used:



                                $ = Enable soft-wrapping of lines (escaped using backslash)
                                c = Show constant cursor position (at bottom)
                                w = Disable any 'hard wrapping'
                                S = Smooth scrolling



                                And (as already mentioned) once in editor, use Esc, $ to toggle soft-wrapping ON/OFF.







                                share|improve this answer














                                share|improve this answer



                                share|improve this answer








                                edited May 15 '17 at 14:35

























                                answered May 10 '17 at 14:12









                                bshea

                                16016




                                16016























                                    2














                                    Open the nanorc generally at ~/.nanorc or /etc/nanorc, comment out the line



                                    set nowrap


                                    And uncomment line



                                    set softwrap


                                    Hope it helps.






                                    share|improve this answer


























                                      2














                                      Open the nanorc generally at ~/.nanorc or /etc/nanorc, comment out the line



                                      set nowrap


                                      And uncomment line



                                      set softwrap


                                      Hope it helps.






                                      share|improve this answer
























                                        2












                                        2








                                        2






                                        Open the nanorc generally at ~/.nanorc or /etc/nanorc, comment out the line



                                        set nowrap


                                        And uncomment line



                                        set softwrap


                                        Hope it helps.






                                        share|improve this answer












                                        Open the nanorc generally at ~/.nanorc or /etc/nanorc, comment out the line



                                        set nowrap


                                        And uncomment line



                                        set softwrap


                                        Hope it helps.







                                        share|improve this answer












                                        share|improve this answer



                                        share|improve this answer










                                        answered Aug 24 at 10:25









                                        Prashant Shubham

                                        312




                                        312























                                            1














                                            Mac users be advised the version of Nano shipped with High Sierra (v2.0.6) or earlier doesn't support soft line wrapping as described here. You'll get an unknown command error. v2.2 is the earliest version with mention of soft wrap in the man pages. So don't spend an hour trying all these solutions like I did.



                                            Esc+L does work as expected.






                                            share|improve this answer


























                                              1














                                              Mac users be advised the version of Nano shipped with High Sierra (v2.0.6) or earlier doesn't support soft line wrapping as described here. You'll get an unknown command error. v2.2 is the earliest version with mention of soft wrap in the man pages. So don't spend an hour trying all these solutions like I did.



                                              Esc+L does work as expected.






                                              share|improve this answer
























                                                1












                                                1








                                                1






                                                Mac users be advised the version of Nano shipped with High Sierra (v2.0.6) or earlier doesn't support soft line wrapping as described here. You'll get an unknown command error. v2.2 is the earliest version with mention of soft wrap in the man pages. So don't spend an hour trying all these solutions like I did.



                                                Esc+L does work as expected.






                                                share|improve this answer












                                                Mac users be advised the version of Nano shipped with High Sierra (v2.0.6) or earlier doesn't support soft line wrapping as described here. You'll get an unknown command error. v2.2 is the earliest version with mention of soft wrap in the man pages. So don't spend an hour trying all these solutions like I did.



                                                Esc+L does work as expected.







                                                share|improve this answer












                                                share|improve this answer



                                                share|improve this answer










                                                answered Sep 5 at 22:11









                                                lodeOfCode

                                                111




                                                111























                                                    0














                                                    The configuration settings for nano 1, nano 2, and nano 3 are different.



                                                    On nano 1, you only have the set nowrap setting which disables all wrapping.



                                                    On nano 2, set softwrap enables softwrapping and disables hardwrapping.



                                                    On nano 3, set softwrap is ignored and nano continues to hardwrap unless you also set set nowrap.



                                                    On nano 2 and 3, no set nowrap only disables hardwrapping! and on nano 3 you MUST use it if you want softwrapping.



                                                    So if you want text wrapping for long lines that doesn't break your configuration files (softwrapping only), this works for versions 2 and 3: ~/.nanorc



                                                    set nowrap
                                                    set softwrap




                                                    share








                                                    New contributor




                                                    x0a is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                    Check out our Code of Conduct.























                                                      0














                                                      The configuration settings for nano 1, nano 2, and nano 3 are different.



                                                      On nano 1, you only have the set nowrap setting which disables all wrapping.



                                                      On nano 2, set softwrap enables softwrapping and disables hardwrapping.



                                                      On nano 3, set softwrap is ignored and nano continues to hardwrap unless you also set set nowrap.



                                                      On nano 2 and 3, no set nowrap only disables hardwrapping! and on nano 3 you MUST use it if you want softwrapping.



                                                      So if you want text wrapping for long lines that doesn't break your configuration files (softwrapping only), this works for versions 2 and 3: ~/.nanorc



                                                      set nowrap
                                                      set softwrap




                                                      share








                                                      New contributor




                                                      x0a is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                      Check out our Code of Conduct.





















                                                        0












                                                        0








                                                        0






                                                        The configuration settings for nano 1, nano 2, and nano 3 are different.



                                                        On nano 1, you only have the set nowrap setting which disables all wrapping.



                                                        On nano 2, set softwrap enables softwrapping and disables hardwrapping.



                                                        On nano 3, set softwrap is ignored and nano continues to hardwrap unless you also set set nowrap.



                                                        On nano 2 and 3, no set nowrap only disables hardwrapping! and on nano 3 you MUST use it if you want softwrapping.



                                                        So if you want text wrapping for long lines that doesn't break your configuration files (softwrapping only), this works for versions 2 and 3: ~/.nanorc



                                                        set nowrap
                                                        set softwrap




                                                        share








                                                        New contributor




                                                        x0a is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                        Check out our Code of Conduct.









                                                        The configuration settings for nano 1, nano 2, and nano 3 are different.



                                                        On nano 1, you only have the set nowrap setting which disables all wrapping.



                                                        On nano 2, set softwrap enables softwrapping and disables hardwrapping.



                                                        On nano 3, set softwrap is ignored and nano continues to hardwrap unless you also set set nowrap.



                                                        On nano 2 and 3, no set nowrap only disables hardwrapping! and on nano 3 you MUST use it if you want softwrapping.



                                                        So if you want text wrapping for long lines that doesn't break your configuration files (softwrapping only), this works for versions 2 and 3: ~/.nanorc



                                                        set nowrap
                                                        set softwrap





                                                        share








                                                        New contributor




                                                        x0a is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                        Check out our Code of Conduct.








                                                        share


                                                        share






                                                        New contributor




                                                        x0a is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                        Check out our Code of Conduct.









                                                        answered 7 mins ago









                                                        x0a

                                                        1011




                                                        1011




                                                        New contributor




                                                        x0a is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                        Check out our Code of Conduct.





                                                        New contributor





                                                        x0a is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                        Check out our Code of Conduct.






                                                        x0a is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                        Check out our Code of Conduct.






























                                                            draft saved

                                                            draft discarded




















































                                                            Thanks for contributing an answer to Unix & Linux Stack Exchange!


                                                            • Please be sure to answer the question. Provide details and share your research!

                                                            But avoid



                                                            • Asking for help, clarification, or responding to other answers.

                                                            • Making statements based on opinion; back them up with references or personal experience.


                                                            To learn more, see our tips on writing great answers.





                                                            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                                            Please pay close attention to the following guidance:


                                                            • Please be sure to answer the question. Provide details and share your research!

                                                            But avoid



                                                            • Asking for help, clarification, or responding to other answers.

                                                            • Making statements based on opinion; back them up with references or personal experience.


                                                            To learn more, see our tips on writing great answers.




                                                            draft saved


                                                            draft discarded














                                                            StackExchange.ready(
                                                            function () {
                                                            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f122795%2flong-line-wrapping-in-nano%23new-answer', 'question_page');
                                                            }
                                                            );

                                                            Post as a guest















                                                            Required, but never shown





















































                                                            Required, but never shown














                                                            Required, but never shown












                                                            Required, but never shown







                                                            Required, but never shown

































                                                            Required, but never shown














                                                            Required, but never shown












                                                            Required, but never shown







                                                            Required, but never shown







                                                            Popular posts from this blog

                                                            Accessing regular linux commands in Huawei's Dopra Linux

                                                            Can't connect RFCOMM socket: Host is down

                                                            Kernel panic - not syncing: Fatal Exception in Interrupt