Closed yochem closed 6 years ago
yaml.nanorc
:
syntax yaml "\.ya?ml"
comment "#"
header "^---" "%YAML"
# Values
color green "(:|^|\s)+\S+"
# Keys
color red "(^|\s+).*+\s*:(\s|$)"
# Special values
color yellow "[:-]\s+(true|false|null)\s*$"
color yellow "[:-]\s+[0-9]+\.?[0-9]*(\s*($|#))"
color yellow "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) "
# Separator
color brightwhite "^\s+-"
color brightwhite ":(\s|\t|$)"
# Comments
color white "(^|[[:space:]])#.*$"
Thanks! I think that looks a lot better. Please feel free to put in a PR with that change. Let me know if you need help
Sure! Is there any style format to which I must comply?
Thanks a ton!
Hi there, there may be a typo in the first 2 lines !
Line1 -syntax yaml ".ya?ml" +syntax "yaml" ".ya?ml"
Line 2 might be to be removed -comment "#"
(Or maybe I misunderstood, tell me if it's the case)
Thank you ! :)
A PR with a fix would be great!
Line1 -syntax yaml ".ya?ml" +syntax "yaml" ".ya?ml"
It's working fine on my computer, but it's indeed better to wrap yaml with quotes.
Line 2 might be to be removed -comment "#"
The comment line enables the option to type M-3
for commenting a line out. From the man-page:
"""
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 function is disabled; for example, "" for JSON. The default value is "#". """" It's a future I use a lot, so that's why I added it to the nanorc file.
@jc-iacono I fixed the syntax yaml part in PR #170
hello scopatz
from a fresh install debian here is the output when start nano (in german):
Fehler in yaml.nanorc in Zeile 2: Befehl „comment“ nicht verstanden
Fehler in yaml.nanorc in Zeile 17: Farbe „normal“ nicht verstanden. Gültige Farben sind „green“ (grün), „red“ (rot), „blue“ (blau), „white“ (weiß), „yellow“ (gelb), „cyan“ (zyanblau), „magenta“ (magentarot) und „black“ (schwarz), mit dem optionalen Präfix „bright“ (hell) für Vordergrundfarben.
Fehler in yaml.nanorc in Zeile 18: Farbe „normal“ nicht verstanden. Gültige Farben sind „green“ (grün), „red“ (rot), „blue“ (blau), „white“ (weiß), „yellow“ (gelb), „cyan“ (zyanblau), „magenta“ (magentarot) und „black“ (schwarz), mit dem optionalen Präfix „bright“ (hell) für Vordergrundfarben.
Drücken Sie die Eingabetaste, um mit dem Starten von nano fortzufahren.
the original code look this:
syntax "yaml" "\.ya?ml"
comment "#"
header "^---" "%YAML"
# Values
color green "(:|^|\s)+\S+"
# Keys
color red "(^|\s+).*+\s*:(\s|$)"
# Special values
color yellow "[:-]\s+(true|false|null)\s*$"
color yellow "[:-]\s+[0-9]+\.?[0-9]*(\s*($|#))"
color yellow "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) "
# Separator
color normal "^\s+-"
color normal ":(\s|\t|$)"
# Comments
color white "(^|[[:space:]])#.*$"
edit yaml.nanorc worked now:
syntax "yaml" "\.ya?ml$"
header "^---" "%YAML"
# Values
color green "(:|^|\s)+\S+"
# Keys
color red "(^|\s+).*+\s*:(\s|$)"
# Special values
color yellow "[:-]\s+(true|false|null)\s*$"
color yellow "[:-]\s+[0-9]+\.?[0-9]*(\s*($|#))"
color yellow "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) "
# Separator
color brightwhite "^\s+-"
color brightwhite ":(\s|\t|$)"
# Comments
color white "(^|[[:space:]])#.*$"
i delete the line commnet "#"
and change normal to brightwhite
in the # Seperator
area
please fix it
thank you very much !!
hhm, what version are you using?
hello,
I used debian 9.4
Yochem van Rosmalen notifications@github.com schrieb am Sa., 5. Mai 2018, 21:37:
hhm, what version are you using?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/scopatz/nanorc/issues/168#issuecomment-386829686, or mute the thread https://github.com/notifications/unsubscribe-auth/AlM-0EeAbYjEdBeqr5ITD5GgDjcYpqh-ks5tvf93gaJpZM4Tueo8 .
The Error say he is not recognized the color by name 'normal' only 'brightwhite'
Markus Krawanja krawanja.markus@gmail.com schrieb am Sa., 5. Mai 2018, 21:44:
hello,
I used debian 9.4
Yochem van Rosmalen notifications@github.com schrieb am Sa., 5. Mai 2018, 21:37:
hhm, what version are you using?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/scopatz/nanorc/issues/168#issuecomment-386829686, or mute the thread https://github.com/notifications/unsubscribe-auth/AlM-0EeAbYjEdBeqr5ITD5GgDjcYpqh-ks5tvf93gaJpZM4Tueo8 .
Please feel free to put in a PR that fixes this issue!
Fixed in PR #171
First of all, thanks for all the work you put in these rc files!
OS: Mac Nano: 2.9.5 (brew) Terminal: Hyper
When i tried using the
yaml.nanorc
file, it worked only partly (only the whitespaces aka the last 2) Here is a screenshot of a yaml file with the current rc file:I created my own yaml rc file. The colors are inspired on the Atom One Dark theme.
Let me know what you think!