From 1e14b00006a4e965bdd13d76cb89898cac0c6e04 Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 7 Mar 2016 22:32:57 +0100 Subject: [PATCH 1/2] Added files via upload --- swift.nanorc | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 swift.nanorc diff --git a/swift.nanorc b/swift.nanorc new file mode 100644 index 0000000..5b64222 --- /dev/null +++ b/swift.nanorc @@ -0,0 +1,40 @@ +############################################################################## +# Swift syntax highlighting for Nano. +############################################################################## + +syntax "Swift" "\.swift$" + +# Default +color white ".+" + +# Operators +color yellow "[.:;,+*|=!?\%]" "<" ">" "/" "-" "&" + +# Statements +color magenta "(class|import|let|var|struct|enum|func|if|else|switch|case|default|for|in|internal|external|unowned|private|public|throws)\ " +color magenta "(prefix|postfix|operator|extension|lazy|get|set|self|willSet|didSet|override|super|convenience|weak|strong|mutating|return|guard)\ " + +# Keywords +color cyan "(print)" +color magenta "(init)" + +# Numbers +color blue "([0-9]+)" + +# Standard Types +color brightmagenta "\ ((U)?Int(8|16|32|64))" +color brightmagenta "(true|false|nil)" +color brightmagenta "\ (Double|String|Float|Boolean|Dictionary|Array|Int)" +color magenta "\ (AnyObject)" + +# Text +color red ""[^"]*"" + +# Comments +color green "//.*" +color brightgreen "///.*" +color green start="/\*\*" end="\*/" +color green "[/**]" + +# Trailing whitespace +color ,green "[[:space:]]+$" From e16c2e005af8ce6e826c2a58c1ef26dc4660358f Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 7 Mar 2016 22:36:16 +0100 Subject: [PATCH 2/2] include swift.nanorc --- nanorc | 1 + 1 file changed, 1 insertion(+) diff --git a/nanorc b/nanorc index 9c3ab4e..be85c74 100644 --- a/nanorc +++ b/nanorc @@ -64,6 +64,7 @@ include "~/.nano/sed.nanorc" include "~/.nano/sh.nanorc" include "~/.nano/sls.nanorc" include "~/.nano/sql.nanorc" +include "~/.nano/swift.nanorc" include "~/.nano/systemd.nanorc" include "~/.nano/tcl.nanorc" include "~/.nano/tex.nanorc"