Comments (14)
Thanks a ton!
from nanorc.
@jc-iacono I fixed the syntax yaml part in PR #170
from nanorc.
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.
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.
Sure! Is there any style format to which I must comply?
from nanorc.
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.
A PR with a fix would be great!
from nanorc.
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.
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.
hhm, what version are you using?
from nanorc.
from nanorc.
from nanorc.
Please feel free to put in a PR that fixes this issue!
from nanorc.
Fixed in PR #171
from nanorc.
Related Issues (20)
- Feature Request [python.nanorc]: add f-string support HOT 1
- Error in .nano/nanorc.nanorc on line 26: Color 'normal' takes no prefix HOT 4
- Revert back
- Feature Request: Resource file for Visual Basic HOT 1
- Syntax Highlighting does not appear when I sudo [Arch] HOT 1
- Support whitespacedisplay HOT 2
- Readme reqeuest: Note where arch installs the nanorc files to
- Solidity HOT 3
- html.nanorc corrupts lines containing emoji HOT 2
- Error in some file on some line: Command "linter/comment" not understood HOT 3
- Lua syntax highlighting is broken HOT 2
- Please support files without file ending HOT 2
- Error in /Users/[USERNAME]/.nano/nanorc.nanorc on line 26: Color 'normal' takes no prefix
- Vlang highlighting HOT 4
- Highlight nano search result (CTRL+W) HOT 5
- Mistakes in '/usr/share/nano-syntax-highlighting/nanorc.nanorc' error message HOT 3
- Add V support HOT 1
- Feature request HOT 2
- Sorry for the noob question. Is /usr/share/nano-syntax-highlighting/ created only by this distribution, or is this a default directory for .nanorc files? HOT 2
- support vue and or svelte. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nanorc.