diff options
author | Denis Efremov <efremov.a.denis@gmail.com> | 2018-02-03 23:12:24 +0300 |
---|---|---|
committer | Denis Efremov <efremov.a.denis@gmail.com> | 2018-02-03 23:12:24 +0300 |
commit | 897c04397653833f5d416ad81711d84f32159bf3 (patch) | |
tree | 5825807f550c7d8e1b7e00f3190ef7285f8b0c5f | |
parent | 0babcf046b44a7b9701ccd4fb96b99984502a9d8 (diff) | |
parent | 573e9267dc4415a0fadb817f032dca84a675992f (diff) |
Merge branch 'master' of https://github.com/serialhex/nano-highlight
-rw-r--r-- | README.md | 30 | ||||
-rw-r--r-- | php.nanorc | 2 | ||||
-rw-r--r-- | yaml.nanorc | 36 |
3 files changed, 52 insertions, 16 deletions
@@ -1,24 +1,24 @@ nano-highlight ============== -a spiffy collection of nano syntax highlighting files +A spiffy collection of nano syntax highlighting files ----------------------------------------------------- -*most* (ok, prettymuch all) of these have been stol\*COUGH\* politely included in this repository. proper +*Most* (ok, prettymuch all) of these have been stol\*COUGH\* politely included in this repository. Proper attribution follows at the end of it all... Unless otherwise specified, all files are under the [unlicense](http://unlicense.org/) WTF do i need these stupid things for??? ---------------------------------------- -well, if EMACS or vi are too much of a **PITA** for you to learn, and all the other text editors you've used are -likewise annoying for some reason (yes i'm looking at you Kate & Gedit) then nano is probably your best option! (or +Well, if EMACS or vi are too much of a **PITA** for you to learn, and all the other text editors you've used are +likewise annoying for some reason (yes i'm looking at you Kate & Gedit) then nano is probably your best option! (Or if you just like the simplicity of using an extremely lightweight console editor, which is one of the biggest reasons why __*I*__ use it) -so HTF do i use these things??? +So HTF do i use these things??? ------------------------------- -one of the easiest ways is like this: +One of the easiest ways is like this: `git clone git://github.com/serialhex/nano-highlight.git ~/.nano` then simply add the different \*.nanorc files that you want to use to your `~/.nanorc` file. for example, this is mine: @@ -48,16 +48,16 @@ then simply add the different \*.nanorc files that you want to use to your `~/.n ## Markdown include "~/.nano/markdown.nanorc"` -there are other spiffy things you can do in your `.nanorc` file, see [nanorc manpage][] online or your very own nanorc manpage for more details. +There are other spiffy things you can do in your `.nanorc` file, see [nanorc manpage][] online or your very own nanorc manpage for more details. -[nanorc manpage]: http://www.nano-editor.org/dist/v2.2/nanorc.5.html +[nanorc manpage]: http://www.nano-editor.org/dist/v2.8/nanorc.5.html OOH!!! that's spiffy!! thanks for all your hard work in making all these files!! ---------------------------------------------------------------------------------- -umm, yeah, about that, i didnt make *all* of them, here is the list of who did what with whom: +Umm, yeah, about that, i didnt make *all* of them, here is the list of who did what with whom: -### files from [nanosyntax][] (New BSD license)### +### Files from [nanosyntax][] (New BSD license) ### [nanosyntax]: http://code.google.com/p/nanosyntax/ apache2.nanorc conf.nanorc gentoo.nanorc man.nanorc plaudis.nanorc sources_list.nanorc @@ -75,7 +75,7 @@ config3.nanorc etcportage.nanorc log-stuff.nanorc perl.nanorc configfiles.nanorc etc-stuff.nanorc maincf.nanorc php2.nanorc sh.nanorc config.nanorc etcxml.nanorc makefile.nanorc php.nanorc softcam.nanorc -### files from [scopatz / nanorc][] ('do whatever you want' licence) ### +### Files from [scopatz / nanorc][] ('do whatever you want' licence) ### [scopatz / nanorc]: https://github.com/scopatz/nanorc *his repo has since changed, see LICENSE for the new license these fall under* @@ -84,14 +84,14 @@ asm.nanorc cython.nanorc html.nanorc markdown.nanorc perl.nanorc fortran.nanorc java.nanorc mutt.nanorc php.nanorc reST.nanorc xml.nanorc conf.nanorc gentoo.nanorc lua.nanorc nanorc.nanorc pov.nanorc ruby.nanorc -### files found 'round the net (see the file for more info) ### +### Files found 'round the net (see the file for more info) ### markdown.nanorc txt2tags.nanorc -### files from [aaronhamilton / coffeescript-nano][] ### +### Files from [aaronhamilton / coffeescript-nano][] ### [aaronhamilton / coffeescript-nano]: https://github.com/aaronhamilton/coffeescript-nano coffee.nanorc -## this is the end ## +## This is the end ## -that's it, have fun & dont hurt yourself!! +That's it, have fun & dont hurt yourself!! @@ -10,7 +10,7 @@ color white "\<[a-z_]*\(" color green "\<(var|float|global|double|bool|char|int|enum|const)\>" ## Structures -color brightyellow "\<(class|new|private|public|function|for|foreach|if|while|do|else|elseif|case|default|switch)\>" +color brightyellow "\<(class|new|private|protected|public|function|for|foreach|if|while|do|else|elseif|case|default|switch)\>" ## Basic control flow color magenta "\<(goto|continue|break|return)\>" diff --git a/yaml.nanorc b/yaml.nanorc new file mode 100644 index 0000000..36c0b5b --- /dev/null +++ b/yaml.nanorc @@ -0,0 +1,36 @@ +# Supports `YAML` files +syntax "YAML" "\.ya?ml$" +header "^(---|===)" "%YAML" + +## Keys +color magenta "^\s*[\$A-Za-z0-9_-]+\:" +color brightmagenta "^\s*@[\$A-Za-z0-9_-]+\:" + +## Values +color white ":\s.+$" +## Booleans +icolor brightcyan " (y|yes|n|no|true|false|on|off)$" +## Numbers +color brightred " [[:digit:]]+(\.[[:digit:]]+)?" +## Arrays +color red "\[" "\]" ":\s+[|>]" "^\s*- " +## Reserved +color green "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) " + +## Comments +color brightwhite "#.*$" + +## Errors +color ,red ":\w.+$" +color ,red ":'.+$" +color ,red ":".+$" +color ,red "\s+$" + +## Non closed quote +color ,red "['\"][^['\"]]*$" + +## Closed quotes +color yellow "['\"].*['\"]" + +## Equal sign +color brightgreen ":( |$)" |