problem solved
Calvin Smith <[email protected]> Sat, 10 Dec 2022 17:27:38 +0000 (UTC)
| Newsgroups | gmane.editors.nano.general |
|---|---|
| Message-ID | <[email protected]> |
Okay, i see that nano automatically inserts different comments if you just use the extension at the beginning of the syntax files On Saturday, December 10, 2022 at 12:02:47 PM EST, <[email protected]> wrote: Send Help-nano mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit https://lists.gnu.org/mailman/listinfo/help-nano or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of Help-nano digest..." Today's Topics: 1. nano recognition of syntax files (Calvin Smith) ---------------------------------------------------------------------- Message: 1 Date: Fri, 9 Dec 2022 22:54:57 +0000 (UTC) From: Calvin Smith <[email protected]> To: "[email protected]" <[email protected]> Subject: nano recognition of syntax files Message-ID: <[email protected]> Content-Type: text/plain; charset="utf-8" Okay, so i found that there are syntax files (or i think that's what these are...) in the /usr/share/nano folder on linux, are these meant to be selected or moved so that someone could use "Esc + 3" to comment/uncomment a section of text? How does this work? On Friday, December 9, 2022 at 12:09:37 PM EST, <[email protected]> wrote: Send Help-nano mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit https://lists.gnu.org/mailman/listinfo/help-nano or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of Help-nano digest..." Today's Topics: 1. on syntax recognition (Calvin Smith) ---------------------------------------------------------------------- Message: 1 Date: Thu, 8 Dec 2022 18:50:54 +0000 (UTC) From: Calvin Smith <[email protected]> To: "[email protected]" <[email protected]> Subject: on syntax recognition Message-ID: <[email protected]> Content-Type: text/plain; charset="utf-8" Thank you Benno, I'm pretty new to programming. What is a "syntax" to nano? Does something about a file you create tell nano that a filehas a particular syntax? Not sure how that works from a practical vantage point: syntax name ["fileregex" ...] Start the definition of a syntax with this name. All subsequent color and other such commands will be added to this syntax, until a new syntax command is encountered. On Thursday, December 8, 2022 at 12:04:46 PM EST, [email protected] <[email protected]> wrote: Send Help-nano mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit https://lists.gnu.org/mailman/listinfo/help-nano or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of Help-nano digest..." Today's Topics: 1. Request help in changing default comment string for nano (Calvin Smith) 2. Re: changing the default comment string for nano -- not possible (Benno Schulenberg) ---------------------------------------------------------------------- Message: 1 Date: Thu, 8 Dec 2022 01:43:47 +0000 (UTC) From: Calvin Smith <[email protected]> To: "[email protected]" <[email protected]> Subject: Request help in changing default comment string for nano Message-ID: <[email protected]> Content-Type: text/plain; charset="utf-8" Hello everyone, nano is a great text editor overall, i like it much better than vim and i have been using it for the past 6 months. However, i would like to know how you can change the comment character from # to something else for a different programming language. The documentation says this: - - 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, "/*|*/" forCSS files. The characters before the pipe are prepended to the line and thecharacters after the pipe are appended at the end of the line. If no pipecharacter is present, the full string is prepended; for example, "#" forPython files. If empty double quotes are specified, the comment/uncommentfunctions are disabled; for example, "" for JSON.The default value is "#". I try to put comment "//" in my .nanorc file, but the program just gives me an error and the default comment remains a #. What's the proper way to change this setting? I tried to fool around with it but i just get red text, which is nano's way of saying that it's an error. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.gnu.org/archive/html/help-nano/attachments/20221208/dd7851d9/attachment.htm> ------------------------------ Message: 2 Date: Thu, 8 Dec 2022 16:03:23 +0100 From: Benno Schulenberg <[email protected]> To: [email protected] Subject: Re: changing the default comment string for nano -- not possible Message-ID: <[email protected]> Content-Type: text/plain; charset="utf-8"; Format="flowed" Op 08-12-2022 om 02:43 schreef Calvin Smith: > i would like to know how you can change the comment character from # to > something else for a different programming language. [...] You set the comment character in the syntax file for the relevant language. > I try to put > > comment "//" > > in my .nanorc file, but the program just gives me an error and the default > comment remains a #. What's the proper way to change this setting? There is no way to change the default comment character _globally_ -- you can only change the comment character per syntax. As 'man nanorc' says: For each kind of file a separate syntax can be defined via the following commands: syntax name ["fileregex" ...] Start the definition of a syntax with this name. All subsequent color and other such commands will be added to this syntax, until a new syntax command is encountered. (And the 'comment' command is one of these subsequent commands.) Benno -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature Type: application/pgp-signature Size: 840 bytes Desc: OpenPGP digital signature URL: <https://lists.gnu.org/archive/html/help-nano/attachments/20221208/99612f85/attachment.sig> ------------------------------ Subject: Digest Footer _______________________________________________ Help-nano mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-nano ------------------------------ End of Help-nano Digest, Vol 177, Issue 1 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.gnu.org/archive/html/help-nano/attachments/20221208/5f48ed7b/attachment.htm> ------------------------------ Subject: Digest Footer _______________________________________________ Help-nano mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-nano ------------------------------ End of Help-nano Digest, Vol 177, Issue 2 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.gnu.org/archive/html/help-nano/attachments/20221209/923648bb/attachment.htm> ------------------------------ Subject: Digest Footer _______________________________________________ Help-nano mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-nano ------------------------------ End of Help-nano Digest, Vol 177, Issue 3 *****************************************