How to comment multiple lines in nano at once?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
5
down vote

favorite
1












I can able to select multiple lines using Esc+A. After this, what shortcut(s) should I use to comment/uncomment the selected lines?







share|improve this question



























    up vote
    5
    down vote

    favorite
    1












    I can able to select multiple lines using Esc+A. After this, what shortcut(s) should I use to comment/uncomment the selected lines?







    share|improve this question























      up vote
      5
      down vote

      favorite
      1









      up vote
      5
      down vote

      favorite
      1






      1





      I can able to select multiple lines using Esc+A. After this, what shortcut(s) should I use to comment/uncomment the selected lines?







      share|improve this question













      I can able to select multiple lines using Esc+A. After this, what shortcut(s) should I use to comment/uncomment the selected lines?









      share|improve this question












      share|improve this question




      share|improve this question








      edited 2 days ago
























      asked 2 days ago









      krk

      454




      454




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          5
          down vote



          accepted










          Esc+3 will comment or uncomment the selected lines in the nano editor. The default comment character used is # (valid in many scripting languages).



          The comment character may be modified by the comment option in your ~/.nanorc file. This is from the manual:




          comment "string"



          Use the given string for commenting and uncommenting lines. If the string contains a vertical bar or pipe character (|), this designates bracket-style comments; for example, "/*|*/" for CSS files. The characters before the pipe are prepended to the line and the characters after the pipe are appended at the end of the line. If no pipe character is present, the full string is prepended; for example, "#" for Python files. If empty double quotes are specified, the comment/uncomment functions are disabled; for example, "" for JSON. The default value is "#".




          See also the nanorc(5) manual on your system (man 5 nanorc).






          share|improve this answer























            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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            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%2f460474%2fhow-to-comment-multiple-lines-in-nano-at-once%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            5
            down vote



            accepted










            Esc+3 will comment or uncomment the selected lines in the nano editor. The default comment character used is # (valid in many scripting languages).



            The comment character may be modified by the comment option in your ~/.nanorc file. This is from the manual:




            comment "string"



            Use the given string for commenting and uncommenting lines. If the string contains a vertical bar or pipe character (|), this designates bracket-style comments; for example, "/*|*/" for CSS files. The characters before the pipe are prepended to the line and the characters after the pipe are appended at the end of the line. If no pipe character is present, the full string is prepended; for example, "#" for Python files. If empty double quotes are specified, the comment/uncomment functions are disabled; for example, "" for JSON. The default value is "#".




            See also the nanorc(5) manual on your system (man 5 nanorc).






            share|improve this answer



























              up vote
              5
              down vote



              accepted










              Esc+3 will comment or uncomment the selected lines in the nano editor. The default comment character used is # (valid in many scripting languages).



              The comment character may be modified by the comment option in your ~/.nanorc file. This is from the manual:




              comment "string"



              Use the given string for commenting and uncommenting lines. If the string contains a vertical bar or pipe character (|), this designates bracket-style comments; for example, "/*|*/" for CSS files. The characters before the pipe are prepended to the line and the characters after the pipe are appended at the end of the line. If no pipe character is present, the full string is prepended; for example, "#" for Python files. If empty double quotes are specified, the comment/uncomment functions are disabled; for example, "" for JSON. The default value is "#".




              See also the nanorc(5) manual on your system (man 5 nanorc).






              share|improve this answer

























                up vote
                5
                down vote



                accepted







                up vote
                5
                down vote



                accepted






                Esc+3 will comment or uncomment the selected lines in the nano editor. The default comment character used is # (valid in many scripting languages).



                The comment character may be modified by the comment option in your ~/.nanorc file. This is from the manual:




                comment "string"



                Use the given string for commenting and uncommenting lines. If the string contains a vertical bar or pipe character (|), this designates bracket-style comments; for example, "/*|*/" for CSS files. The characters before the pipe are prepended to the line and the characters after the pipe are appended at the end of the line. If no pipe character is present, the full string is prepended; for example, "#" for Python files. If empty double quotes are specified, the comment/uncomment functions are disabled; for example, "" for JSON. The default value is "#".




                See also the nanorc(5) manual on your system (man 5 nanorc).






                share|improve this answer















                Esc+3 will comment or uncomment the selected lines in the nano editor. The default comment character used is # (valid in many scripting languages).



                The comment character may be modified by the comment option in your ~/.nanorc file. This is from the manual:




                comment "string"



                Use the given string for commenting and uncommenting lines. If the string contains a vertical bar or pipe character (|), this designates bracket-style comments; for example, "/*|*/" for CSS files. The characters before the pipe are prepended to the line and the characters after the pipe are appended at the end of the line. If no pipe character is present, the full string is prepended; for example, "#" for Python files. If empty double quotes are specified, the comment/uncomment functions are disabled; for example, "" for JSON. The default value is "#".




                See also the nanorc(5) manual on your system (man 5 nanorc).







                share|improve this answer















                share|improve this answer



                share|improve this answer








                edited 2 days ago


























                answered 2 days ago









                Kusalananda

                100k13199311




                100k13199311






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f460474%2fhow-to-comment-multiple-lines-in-nano-at-once%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Displaying single band from multi-band raster using QGIS

                    How many registers does an x86_64 CPU actually have?