Request help in changing default comment string for nano
Calvin Smith <[email protected]> Thu, 8 Dec 2022 01:43:47 +0000 (UTC)
| Newsgroups | gmane.editors.nano.general |
|---|---|
| Message-ID | <[email protected]> |
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