Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Simon May
config
Commits
5eda928b
Commit
5eda928b
authored
Jul 13, 2019
by
Simon May
Browse files
Update nanorc to nano v3.2, but stay compatible with v2.7.3
nano version installed on Freya is nano v2.7.3
parent
bbe31422
Changes
29
Hide whitespace changes
Inline
Side-by-side
.nano/awk.nanorc
View file @
5eda928b
## Here is an example for awk.
syntax "awk" "\.awk$"
header "^#!.*awk"
magic "awk script"
comment "#"
...
...
@@ -18,8 +19,7 @@ color green "(\{|\}|\(|\)|\;|\]|\[|\\|<|>|!|=|&|\+|-|\*|%|/|\?:|\^|\|)"
color brightyellow "\<(for|if|while|do|else|in|delete|exit)\>"
color brightyellow "\<(break|continue|return)\>"
# I/O statements.
color brightgreen "\<(close|getline|next|nextfile|print|printf)\>"
color brightgreen "\<(system|fflush)\>"
color brightgreen "\<(close|fflush|getline|next|nextfile|print|printf|system)\>"
# Standard functions.
color magenta "\<(atan2|cos|exp|int|log|rand|sin|sqrt|srand)\>"
color magenta "\<(asort|asorti|gensub|gsub|index|length|match)\>"
...
...
.nano/c.nanorc
View file @
5eda928b
## Here is an example for C/C++.
syntax "c" "\.(
c(c|pp|xx|\+\+)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.
ii?$"
syntax "c" "\.(
[ch](pp|xx)?|C|cc|c\+\+|H|hh|
ii?
)
$"
magic "^(C|C\+\+) (source|program)"
comment "//"
...
...
.nano/changelog.nanorc
View file @
5eda928b
## Colouring for Changelogs.
syntax "changelog" "Change[Ll]og
.*
"
syntax "changelog" "Change[Ll]og
[^/]*$
"
# Author lines.
color green "^(19|20).*
$
"
color green "^(19|20).*"
# Dates.
color red "^(19|20)[0-9-]{8}"
# Email addresses.
...
...
.nano/cmake.nanorc
View file @
5eda928b
...
...
@@ -15,6 +15,5 @@ icolor brightred "^[[:space:]]*((end)?(function|macro)|return)"
icolor cyan start="\$(\{|ENV\{)" end="\}"
color magenta "\<(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\>"
icolor brightblue "^([[:space:]]*)?#.*"
icolor brightblue "[[:space:]]#.*"
color brightblue "(^|[[:space:]])#.*"
color ,green "[[:space:]]+$"
.nano/debian.nanorc
View file @
5eda928b
## Here is an example for apt's sources.list.
syntax "sources.list" "sources\.list(
~|\.old|\.save)?$" "sources\.list
\.d/.*\.list(~|\.old|\.save)?$"
syntax "sources.list" "sources\.list(\.d/.*\.list
)?
(~|\.old|\.save)?$"
comment "#"
# Coloring the deb lines, working from tail to head. First the
...
...
.nano/default.nanorc
View file @
5eda928b
...
...
@@ -11,7 +11,7 @@ color cyan "^[[:space:]]*#.*"
color ,red " + +"
# Nano's name, including version.
color brightred "(GNU )?
n
ano [1-
9
]\.[0-9]
\.[^[:space:][:punct:]]+
"
color brightred "(GNU )?
[Nn]
ano [1-
3
]\.[0-9]
[-.[:alnum:]]*\>
"
# Email addresses.
color magenta "<[[:alnum:].%_+-]+@[[:alnum:].-]+\.[[:alpha:]]{2,}>"
.nano/elisp.nanorc
View file @
5eda928b
...
...
@@ -30,4 +30,4 @@ color blue ":(\w|[?-])+"
color yellow start="^[[:blank:]]+\"" end="[^\]\""
color yellow ""(\\.|[^"])*""
# Comments
color cyan "(^|[[:space:]]);.*
$
"
color cyan "(^|[[:space:]]);.*"
.nano/gentoo.nanorc
View file @
5eda928b
...
...
@@ -39,7 +39,7 @@ color brightblue "\<tc-(arch(-kernel)?|export|has-(tls|openmp))\>"
## Common commands used in ebuilds:
color blue "\<(awk|cat|cd|chmod|chown|cp|echo|env|find|e?grep|ln|make|mkdir|mv|popd|printf|pushd|rm|rmdir|sed|set|tar|touch|unset|xargs)\>"
## Comments (doesn't work that well):
color yellow "(^|[[:space:]])#.*
$
"
color yellow "(^|[[:space:]])#.*"
## Strings (doesn't work that well):
color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"
## Trailing space is bad!
...
...
@@ -52,7 +52,7 @@ syntax "/etc/portage" "\.(accept_keywords|env|keywords|mask|unmask|use)(/.+)?$"
comment "#"
## Base text:
color green "
^
.+
$
"
color green ".+"
## Likely version and slot numbers:
color magenta "-[[:digit:].]+(_(alpha|beta|pre|rc|p)[[:digit:]]*)*(-r[[:digit:]]+)?([:[:space:]]|$)"
color magenta ":[^[:space:]]+([[:space:]]|$)"
...
...
@@ -67,7 +67,7 @@ color cyan "^[[:space:]]*[^/]*/"
## Masking regulators:
color brightmagenta "^[[:space:]]*(=|~|<|<=|>|>=)"
## Comments:
color yellow "#.*
$
"
color yellow "#.*"
## Trailing space is bad!
color ,green "[[:space:]]+$"
## Mixed whitespace is also bad.
...
...
.nano/go.nanorc
View file @
5eda928b
...
...
@@ -3,9 +3,6 @@
syntax "go" "\.go$"
comment "//"
# Set up a formatter since spelling is probably useless...
formatter gofmt -w
# Types.
color green "\<(bool|u?int(8|16|32|64)?|float(32|64)|complex(64|128)|byte|rune|uintptr|string|error)\>"
color green "\<((<-[[:space:]]*)chan|chan[[:space:]]*<-|const|func|interface|map|struct|type|var)\>"
...
...
@@ -24,9 +21,11 @@ color brightcyan "\<(package|import)\>"
color brightcyan "//[[:space:]]*\+build[[:space:]]+(([a-zA-Z_0-9]+[[:space:]]*)+,[[:space:]]*)*[a-zA-Z_0-9]+"
# Literals.
color red "\<0([0-7]*|[xX][0-9a-fA-F]+)\>"
color red "(\<0+|\B)\.[0-9]+([Ee][+-]?[0-9]+)?i?\>"
color red "\<[1-9][0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?i?\>"
color red "\<([1-9][0-9]*|0[0-7]*|0[xX][0-9A-Fa-f]+)\>"
color red "\<[0-9]+\.[0-9]*([eE][+-]?[0-9]+)?i?\>"
color red "\<[0-9]+[eE][+-]?[0-9]+i?\>"
color red "\B\.[0-9]+([eE][+-]?[0-9]+)?i?\>"
color red "\<[0-9]+i\>"
# Strings and characters; slightly fuzzy.
color red "\<(true|false|nil|iota|_)\>"
...
...
.nano/groff.nanorc
View file @
5eda928b
## Here is an example for groff.
syntax "groff" "
\.m[ems]$" "\.rof" "\.tmac$" "^tmac.
"
syntax "groff" "
(/tmac\.[^/]+$|\.(m[ems]|rof|tmac)$)
"
comment ".\""
# The argument of .ds or .nr
...
...
@@ -15,7 +15,7 @@ color cyan start="(\\|\\\\)n\[" end="]"
# Requests
color brightgreen "^\.[[:space:]]*[^[:space:]]*"
# Comments
color yellow "^\.\\".*
$
"
color yellow "^\.\\".*"
# Strings
color green "(\\|\\\\)\*(.|\(..)"
color green start="(\\|\\\\)\*\[" end="]"
...
...
.nano/guile.nanorc
View file @
5eda928b
...
...
@@ -21,4 +21,4 @@ color blue "#?:(\w|[?-])+"
color yellow start="^[[:blank:]]+\"" end="[^\]\""
color yellow ""(\\.|[^"])*""
# Comments
color cyan "(^|[[:space:]]);.*
$
"
color cyan "(^|[[:space:]]);.*"
.nano/json.nanorc
View file @
5eda928b
...
...
@@ -28,7 +28,7 @@ color brightred "\{" "\}"
color brightred "," ":"
# Comments.
color cyan "(^|[[:space:]]+)(//|#).*
$
"
color cyan "(^|[[:space:]]+)(//|#).*"
# Trailing whitespace.
color ,green "[[:space:]]+$"
.nano/lua.nanorc
View file @
5eda928b
...
...
@@ -5,12 +5,15 @@
syntax "lua" "\.lua$"
magic "Lua script"
linter "luacheck --no-color"
comment "--"
color brightwhite "\[\[.*\]\]"
# Operators
color brightyellow ":|\*|/|%|\+|-|\^|>|>=|<|<=|~=|=|\.\.|\<(not|and|or)\>"
color brightyellow ":|\*|/|%|\+|-|\^|>|>=|<|<=|~=|=|\.\.|#|\<(not|and|or)\>"
# Don't partially color ... as an operator
#color normal "\.\.\."
# Statements
color brightblue "\<(do|end|while|repeat|until|if|elseif|then|else|for|in|function|local|return|break)\>"
...
...
@@ -49,9 +52,9 @@ color brightmagenta "\(|\)|\[|\]|\{|\}"
# Shebang
color brightcyan "^#!.*"
# Strings
color red ""(\\.|[^"\])*"|'(\\.|[^'\])*'"
# Simple comments and multiline comments
color green "--.*"
color green start="--\[\[" end="\]\]"
# Strings
color red ""(\\.|[^"\])*"|'(\\.|[^'\])*'"
.nano/makefile.nanorc
View file @
5eda928b
## Here is an example for Makefiles.
syntax
"makefile"
"
M
akefile[^/]*$
"
"
\.(make|mk)$"
syntax
"makefile"
"
(/((GNU)?m|M)
akefile[^/]*$
|
\.(make|mk)$
)
"
magic
"makefile script"
comment
"#"
color red "[
:
=]"
color
magenta
"\<(if|ifeq|else|endif)\>"
# Assignments.
color red " (
:
?:|
\+
|
\?
)?= "
# Keywords.
color
magenta
"^(if|ifn?def|ifn?eq|else|endif|(-|s)?include)\>"
color
magenta
"^((override +)?(un)?define|endef|(un)?export|private|vpath)\>"
# Variable expansions.
color
blue
"\$+[{(][a-zA-Z0-9_-]+[})]"
# Targets.
color brightblue "^[^ ]+
:
"
# Comments.
color green "(^|[[
:
space:]]+)
#
.*"
#
# Trailing whitespace.
# Trailing whitespace.
color ,green "[[
:
space:]]+$"
.nano/man.nanorc
View file @
5eda928b
...
...
@@ -4,15 +4,15 @@ syntax "man" "\.[1-9]x?$"
magic "troff or preprocessor input"
comment ".\""
color green "\.(SH|SS|TH) .*
$
"
color green "\.(SH|SS|TH) .*"
color brightgreen "\.(SH|SS|TH) " "\.([HIT]P)"
color brightred "\.(B[IR]?|I[BR]?|R[BI]|S[BM]) .*
$
"
color brightred "\.(B[IR]?|I[BR]?|R[BI]|S[BM]) .*"
color brightblue "\.(B[IR]?|I[BR]?|R[BI]|S[BM]) " "\.([LP]?P)$"
color magenta "\\f[BIPR]"
color yellow "\.(br|DT|RS|RE|PD)"
# Comments.
color cyan "\.?\\\".*
$
"
color cyan "\.?\\\".*"
# Trailing whitespace.
color ,green "[[:space:]]+$"
.nano/mgp.nanorc
View file @
5eda928b
...
...
@@ -4,7 +4,6 @@ syntax "mgp" "\.mgp$"
header "^%include.*"
comment "#"
icolor green "^%[a-z].*$"
color cyan "(^|[[:space:]])#.*$"
color cyan "(^|[[:space:]])%%.*$"
icolor green "^%[a-z].*"
color cyan "(^|[[:space:]])(#|%%).*"
color ,green "[[:space:]]+$"
.nano/nanohelp.nanorc
View file @
5eda928b
...
...
@@ -4,8 +4,8 @@
syntax "nanohelp"
# Key combos:
color cyan "\^[]4-8A-Z^\_◀▶▲▼]" "[◀▶▲▼]"
"(\^|M-)Space"
"\<M-." "\<F1?[0-9]"
color cyan "\<(
Tab|
Sh-Tab|Enter|Ins|
Del
|Bsp|Up|Down|Left|Right|Home|End|PgUp|PgDn)\>"
color cyan "\^[]4-8A-Z^\_◀▶▲▼]" "[◀▶▲▼]" "\<M-." "\<F1?[0-9]"
color cyan "\<(
(
Sh-
)?
Tab|Enter|Ins|
(Sh-\^?)?Del|Space
|Bsp|Up|Down|Left|Right|Home|End|PgUp|PgDn)\>"
# Quoted indicators:
color brightred "'(\^|M-)'"
.nano/nanorc.nanorc
View file @
5eda928b
...
...
@@ -4,28 +4,28 @@ syntax "nanorc" "\.?nanorc$"
comment "#"
# Possible errors and parameters
icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|
formatter|
i?color|extendsyntax).*
$
"
icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|i?color|extendsyntax).*"
# Keywords
icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(allow_insecure_backup|atblanks|autoindent|backup|backwards|boldtext|casesensitive|constantshow|cutfromcursor|fill[[:space:]]+-?[[:digit:]]+|historylog|linenumbers|locking|morespace|mouse|multibuffer|noconvert|nohelp|nopauses|nonewlines|nowrap|positionlog|preserve|quickblank|quiet|rebinddelete|rebindkeypad|regexp|showcursor|smarthome|smooth|softwrap|suspend|tabsize[[:space:]]+[1-9][0-9]*|tabstospaces|tempfile|trimblanks|unix|view|wordbounds)\>"
icolor yellow "^[[:space:]]*set[[:space:]]+((function|key|number|selected|status|title)color)[[:space:]]+(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
icolor brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|functioncolor|keycolor|matchbrackets|numbercolor|operatingdir|punct|quotestr|selectedcolor|speller|statuscolor|titlecolor|whitespace|wordchars)[[:space:]]+"
icolor brightgreen "^[[:space:]]*bind[[:space:]]+((\^([[:alpha:]]|[]
0-9
\^_]|Space)|M-([[:alpha:]]|[]!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space))|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+[[:alpha:]]+[[:space:]]+(all|main|search|replace(with)?|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)"
icolor brightgreen "^[[:space:]]*unbind[[:space:]]+((\^([[:alpha:]]|[]
0-9
\^_]|Space)|M-([[:alpha:]]|[]!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space))|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+(all|main|search|replace(with)?|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)"
icolor brightgreen "^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|comment|linter
|formatter
)[[:space:]]+.*
$
"
icolor brightgreen "^[[:space:]]*(
linter|format
ter)[[:space:]]+[[:
alpha
:]]+"
icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|
formatter|
extendsyntax)\>"
icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(
afterends|
allow_insecure_backup|atblanks|autoindent|backup|backwards|boldtext|casesensitive|constantshow|cutfromcursor|fill[[:space:]]+-?[[:digit:]]+|historylog|linenumbers|locking|morespace|mouse|multibuffer|noconvert|nohelp|nopauses|nonewlines|nowrap|positionlog|preserve|quickblank|quiet|rebinddelete|rebindkeypad|regexp|showcursor|smarthome|smooth|softwrap|suspend|tabsize[[:space:]]+[1-9][0-9]*|tabstospaces|tempfile|trimblanks|unix|view|wordbounds
|zap
)\>"
icolor yellow "^[[:space:]]*set[[:space:]]+((
error|
function|key|number|selected|status|title)color)[[:space:]]+(bright)?(white|black|red|blue|green|yellow|magenta|cyan
|normal
)?(,(white|black|red|blue|green|yellow|magenta|cyan
|normal
))?\>"
icolor brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|
errorcolor|
functioncolor|keycolor|matchbrackets|numbercolor|operatingdir|punct|quotestr|selectedcolor|speller|statuscolor|titlecolor|whitespace|wordchars)[[:space:]]+"
icolor brightgreen "^[[:space:]]*bind[[:space:]]+((\^([[:alpha:]]|[]
@
\^_]|Space)|M-([[:alpha:]]|[]!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space))|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+
(
[[:alpha:]]+
|".*")
[[:space:]]+(all|main|search|replace(with)?|
yesno|
gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)"
icolor brightgreen "^[[:space:]]*unbind[[:space:]]+((\^([[:alpha:]]|[]
@
\^_]|Space)|M-([[:alpha:]]|[]!"#$%&'()*+,./0-9:;<=>?@\^_`{|}~-]|Space))|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+(all|main|search|replace(with)?|
yesno|
gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)"
icolor brightgreen "^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|comment|linter)[[:space:]]+.*"
icolor brightgreen "^[[:space:]]*(
syntax|lin
ter)[[:space:]]+[
^
[:
blank
:]]+"
icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|comment|linter|extendsyntax)\>"
# Strings
color brightmagenta "".+"([[:space:]]|$)"
# Colors
icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan
|normal
)?(,(white|black|red|blue|green|yellow|magenta|cyan
|normal
))?\>"
icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)="
# Comments
color brightblue "(^|[[:space:]]+)#.*
$
"
color cyan "^[[:space:]]*##.*
$
"
color brightblue "(^|[[:space:]]+)#.*"
color cyan "^[[:space:]]*##.*"
# Trailing whitespace
color ,green "[[:space:]]+$"
.nano/nftables.nanorc
View file @
5eda928b
...
...
@@ -17,7 +17,7 @@ color red "\<(drop|reject)\>"
color brightblue "\<(accept|continue|(d|s)nat|goto|jump|masquerade|return)\>"
# Comments
color cyan "(^|[[:space:]])#.*
$
"
color cyan "(^|[[:space:]])#.*"
# Trailing whitespace
color ,green "[[:space:]]+$"
...
...
.nano/objc.nanorc
View file @
5eda928b
...
...
@@ -38,5 +38,5 @@ color brightblue "^[[:space:]]*#[[:space:]]*(define|include|import|(un|ifn?)def|
color yellow "//.*"
color yellow start="/\*" end="\*/"
# Trailing whitespace.
# Trailing whitespace.
color ,green "[[:space:]]+$"
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment