Git Product home page Git Product logo

Comments (14)

scopatz avatar scopatz commented on July 24, 2024 1

Thanks a ton!

from nanorc.

yochem avatar yochem commented on July 24, 2024 1

@jc-iacono I fixed the syntax yaml part in PR #170

from nanorc.

yochem avatar yochem commented on July 24, 2024

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:]])#.*$"

from nanorc.

scopatz avatar scopatz commented on July 24, 2024

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

from nanorc.

yochem avatar yochem commented on July 24, 2024

Sure! Is there any style format to which I must comply?

from nanorc.

jc-iacono avatar jc-iacono commented on July 24, 2024

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 ! :)

from nanorc.

scopatz avatar scopatz commented on July 24, 2024

A PR with a fix would be great!

from nanorc.

yochem avatar yochem commented on July 24, 2024

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:
"""

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
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.

from nanorc.

DDifDEVzero avatar DDifDEVzero commented on July 24, 2024

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 !!

from nanorc.

yochem avatar yochem commented on July 24, 2024

hhm, what version are you using?

from nanorc.

DDifDEVzero avatar DDifDEVzero commented on July 24, 2024

from nanorc.

DDifDEVzero avatar DDifDEVzero commented on July 24, 2024

from nanorc.

scopatz avatar scopatz commented on July 24, 2024

Please feel free to put in a PR that fixes this issue!

from nanorc.

yochem avatar yochem commented on July 24, 2024

Fixed in PR #171

from nanorc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.