If you are a UNIX lover and fan of Nano text editor then while writing C / C++ code, you would like to put comments using Short-Cut key i.e.
Alt+3. But the problem is, Nano puts the char
# as comment literal instead of
//. This happened because the default literal is
# unless it is defined in configurations.
How to fix?
Open the config file for C language like in text-editor like:
$ sudo nano /usr/share/nano/c.nanorc
add a line at the end
# Tell nano that comment literal for C is '
//' comment "//"
save and you are done. Now you can comment and un-comment correctly using
Alt + 3 key binding.
In case of C++ or PHP just update the respective files in the same directory.