help-nano
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Request help in changing default comment string for nano


From: Calvin Smith
Subject: Request help in changing default comment string for nano
Date: Thu, 8 Dec 2022 01:43:47 +0000 (UTC)

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, "/*|*/" 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 "#". 


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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]