Re: Bash syntax highlighting: Quoted text in comments
Benno Schulenberg <[email protected]>
| Newsgroups | gmane.editors.nano.general |
|---|---|
| Message-ID | <[email protected]> |
Op 19-02-18 om 17:09 schreef Michael Siegel: > Am 18.02.2018 um 11:11 schrieb Benno Schulenberg: >> But... maybe a point could be made that quotes in comments are more >> common than space plus hash in strings? What do you think? Do you >> have a large set of scripts that you can grep? > > Unfortunately, I don't. And I would say that whatever such statistics > may show, potentially having the highlighting of your actual code > screwed up is definitely worse than having strings in comments > highlighted in a different color, which is, after all, kind of trivial. True. With the current shell syntax rules, in the following example it is just 'somefile;' that will be colored as if it were a comment: grep "such #so" somefile; But if we swap the coloring of Comments and Strings, then the whole '#so" somefile;' would be colored as a comment, which looks ugly and makes the command hard to read. >> (I now see that the order of comment and string highlighting was >> changed in the beginning of 2014, from nano-2.3.2 onwards. Maybe >> that swap should be turned back?) > > Well, I haven't noticed any differences between versions 2.2.6 (which > I'm still using on one of my systems) and 2.7.4 so far, as far as > highlighting Bash scripts goes. If you try the above example on both systems, you should be able to see the difference. > So, are there any chances that nano will gain the ability to fully parse > scripts for highlighting in the near future? No, no chance. Nano is a small editor, fully parsing all the files for which it provides syntax coloring is not within its scope. > PS: Another small thing I noticed: Why would you bind the copy-to-buffer > action to M-^/M-6 when cut to buffer is ^K/F9 and paste is ^U/F10? Seems > inconsistent to me. This feature (copy-to-cutbuffer) was added in April 2006. It is a feature that Pico doesn't have. There were no Ctrl+letter keys left to assign it to, nor any function keys. So, as it has something to do with marked text, I suppose the idea was that a key should be chosen that is related to toggling the mark (Ctrl+^ or Ctrl+6). Benno _______________________________________________ Help-nano mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-nano
signature.asc
(application/pgp-signature, 801 B)
-----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJaiweOAAoJEA0o1NKgrOiEzBQP/3AkSVuvKH3FpikcTL0DS65s DLdU/O8WUAVoeSm8vBHZfwaFbscArXD95YmWaXBX0XbUEZtkl8gz8R5QpP3jQxDb QycItU4Cq+Kn7tNOZ1doutlBUi2k8zIX1IL9g59n8E9FmIQ2nmA5H7AX+FN+2Ei8 BHyR/xr3B+RK38cEetGgJr6Vg0uJpSAmxjw1NYG5DQhE6TXInrnPW0WiozYbrzkO yU8nQGwVmdND8/cH2+M+p7747MrZXaIoyw5jIatoScVReIrHl4f3c4JhVGrybYPs mEHM+jbvugwgZVV0ND3X+h2rs5P9e7HqPq5HQUC699UQDv9Xa8zS9vlcFUfFr2Ca lzUEhmCXx4wdelWftxoF9HDj9xe4/lj1lnjcI0WBBtIP44H55RyoxxAjIBoBGFtR /F8Ov3cKYmjM/3nsuXsWpfu7oIxeiel18vMGva3RnCjJ6r6vOf0enHoeEktN5hJY Be+t/u6tpN9SrLhq18gwurZ+fdUnRLpVav2uhDeNz1hgFwNONHSWkfJUrgGJbHZ2 pXuWvwEpu7JC/wviENKUEXOX9lbw7RCEeB6c+Lx0oAUQhWt+h9iqQwjDAS4jJC07 McLhZWkkHRYL4kLeJuiRmfS/bUzNFpl3KEq29fIVkKc0Wu0Mg7kwWXOYbRb9H+j4 9VmyZDAFLn+8yTulto9C =H0jN -----END PGP SIGNATURE-----