Adding csharp syntax highlighting to nano. Thankyou.

collins muturi <[email protected]>
Newsgroups gmane.editors.nano.devel
Message-ID <CAB=C27sRycBGG2vig2CuzN1QB8h5hcFrZbp-nne_Zj268YXY=g@mail.gmail.com>
0001-Added-syntax-cs.nanorc-syntax-highlighting-for-cshar.patch (text/x-patch, 1.3 KB)
From 897143930e64e7eae819527274e2910b4476634e Mon Sep 17 00:00:00 2001
From: CollinseyNyaga <[email protected]>
Date: Wed, 31 Aug 2022 20:48:44 +0300
Subject: [PATCH] Added /syntax/cs.nanorc --> (syntax highlighting for csharp
 programming language)

Signed-off-by: CollinseyNyaga <[email protected]>
---
 syntax/cs.nanorc | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100755 syntax/cs.nanorc

diff --git a/syntax/cs.nanorc b/syntax/cs.nanorc
new file mode 100755
index 00000000..a399f510
--- /dev/null
+++ b/syntax/cs.nanorc
@@ -0,0 +1,18 @@
+## Syntax highlighting for Csharp.
+
+syntax cs "\.cs$"
+magic "Csharp "
+comment "//"
+
+
+color italic,green "\<(bool|byte|char|double|float|int|long|new|short|string|this|transient|uint|void)\>"
+color bold,red "\<(break|case|catch|continue|default|do|else|finally|for|foreach|if|return|switch|throw|try|while)\>"
+color cyan "\<(abstract|class|as|enum|final|is|interface|struct|using)\>"
+color bold,white "\<(namespace|private|protected|public|static|throws|volatile|virtual)\>"
+color orange ""[^"]*""
+color bold,orange "\<(true|false|null)\>"
+color italic,yellow "//.*"
+color italic,yellow start="/\*" end="\*/"
+color brightgreen start="/\*\*" end="\*/"
+
+#color ,white "[[:space:]]+$"
-- 
2.30.2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.