mirror of
https://github.com/scopatz/nanorc
synced 2024-11-24 03:10:26 +01:00
fixed some regex not working on osx.
Regex Word boundary "\b" not working on OSX, relaced with Start "\<" and End of Word "\>".
This commit is contained in:
parent
2358b0f7c2
commit
beb092d898
22
swift.nanorc
22
swift.nanorc
|
@ -12,27 +12,27 @@ color yellow "[.:;,+*|=!?\%]" "<" ">" "/" "-" "&"
|
||||||
color brightyellow "[!]"
|
color brightyellow "[!]"
|
||||||
|
|
||||||
# Statements
|
# Statements
|
||||||
color magenta "\b(class|import|let|var|struct|enum|func|if|else|switch|case|default|for|in|internal|external|unowned|private|public|throws)\b"
|
color magenta "\<(class|import|let|var|struct|enum|func|if|else|switch|case|default|for|in|internal|external|unowned|private|public|throws)\>"
|
||||||
color magenta "\b(prefix|postfix|operator|extension|lazy|get|set|self|willSet|didSet|override|super|convenience|weak|strong|mutating|return|guard)\b"
|
color magenta "\<(prefix|postfix|operator|extension|lazy|get|set|self|willSet|didSet|override|super|convenience|weak|strong|mutating|return|guard)\>"
|
||||||
|
|
||||||
# Keywords
|
# Keywords
|
||||||
color cyan "\b(print)\b"
|
color cyan "\<(print)\>"
|
||||||
color magenta "\b(init)\b"
|
color magenta "\<(init)\>"
|
||||||
|
|
||||||
# Numbers
|
# Numbers
|
||||||
color blue "\b([0-9]+)\b"
|
color blue "\<([0-9]+)\>"
|
||||||
|
|
||||||
# Standard Types
|
# Standard Types
|
||||||
color brightmagenta "\b((U)?Int(8|16|32|64))\b"
|
color brightmagenta "\<((U)?Int(8|16|32|64))\>"
|
||||||
color brightmagenta "\b(true|false|nil)\b"
|
color brightmagenta "\<(true|false|nil)\>"
|
||||||
color brightmagenta "\b(Double|String|Float|Bool|Dictionary|Array|Int|UInt|Character|Range|Set|UnicodeScalar|Bit|RawByte|Slice|UnsafePointer|UnsafeMutablePointer)\b"
|
color brightmagenta "\<(Double|String|Float|Bool|Dictionary|Array|Int|UInt|Character|Range|Set|UnicodeScalar|Bit|RawByte|Slice|UnsafePointer|UnsafeMutablePointer)\>"
|
||||||
color magenta "\b(AnyObject)\b"
|
color magenta "\<(AnyObject)\>"
|
||||||
|
|
||||||
# Standard Type Aliases and Protocols
|
# Standard Type Aliases and Protocols
|
||||||
color magenta "\b(AnyObject|AnyClass|GeneratorType|AnyGenerator|Element|Optional|Mirror|UnicodeScalarType|IntMax|UIntMax|Void|Any|Comparable|Equatable|Hashable|SequenceType)\b"
|
color magenta "\<(AnyObject|AnyClass|GeneratorType|AnyGenerator|Element|Optional|Mirror|UnicodeScalarType|IntMax|UIntMax|Void|Any|Comparable|Equatable|Hashable|SequenceType)\>"
|
||||||
|
|
||||||
# Standard Libraries
|
# Standard Libraries
|
||||||
color cyan "\b(Foundation|Glibc|Darwin|XCTest)\b"
|
color cyan "\<(Foundation|Glibc|Darwin|XCTest)\>"
|
||||||
|
|
||||||
# Text
|
# Text
|
||||||
color red ""[^"]*""
|
color red ""[^"]*""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user