Code is inspected far more often than it is written, and when inspecting code, some people do want to be alerted to trailing whitespace. So that's why it is in several of the *.nanorc files. However, those files in /usr/share/nano are just examples -- they are meant to be customized by the user. Most distributions, however, include and activate them by default.
By the way, it is not necessary to edit the files in /usr/share/nano; you can instead redefine any syntax in your ~/.nanorc: just put in 'syntax "sh" "\.sh$"' and follow it by the color commands that you do want. (In newer nanos (2.4.0 and higher) there is no need to completely redefine a syntax; you can just add or override things with 'extendsyntax'. In your case you would put 'extendsyntax sh color black, "[[:space:]]+$"' to get rid of the trailing-whitespace colouring.) If, when reading code, you do want trailing whitespace to be highlighted, you can just toggle syntax colouring off with Alt+Y while you are typing the code, and toggle it back on when you are done writing. Okay, all that is selfhelp. But if you think that for most people the colouring of trailing whitespace should never be the default, you could report a bug to nano itself (https://savannah.gnu.org/bugs/?group=nano) or send an email to its development list (https://lists.gnu.org/mailman/listinfo/nano-devel). -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to nano in Ubuntu. https://bugs.launchpad.net/bugs/1361131 Title: constantly flashing bright green while typing Status in nano package in Ubuntu: New Bug description: While editing a shell script (.sh file) nano colours trailing spaces bright green. It also considers spaces that have just been typed to be trailing spaces. This results in constant flashing bright green while typing, which is both distracting and annoying. It's at its most ridiculous when typing comments (for which trailing whitespace is obviously completely irrelevant), but is also irritating any time you happen to look at what you're typing. Which for me is, as it happens, all the time. Ideal solution: only display trailing whitespace if the user is not, you know, still typing on that line, with the cursor right there. Easy solution: just shut up about the damn spaces already. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nano/+bug/1361131/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp

