From 211a5e4c4dd38b74f194bff7b44cd6f4995b0b2d Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Mon, 31 Mar 2014 20:26:03 +0000 Subject: [PATCH] 2014-03-31 Chris Allegretta * doc/syntax/go.nanorc: basic go syntax highlighting git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4700 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 3 +++ doc/syntax/go.nanorc | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 doc/syntax/go.nanorc diff --git a/ChangeLog b/ChangeLog index 06894f34..c6902e05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2014-03-31 Chris Allegretta + * doc/syntax/go.nanorc: basic go syntax highlighting + 2014-03-30 Benno Schulenberg * doc/syntax/changelog.nanorc: New file, first attemp at colouring Changelog files. diff --git a/doc/syntax/go.nanorc b/doc/syntax/go.nanorc new file mode 100644 index 00000000..8573a87c --- /dev/null +++ b/doc/syntax/go.nanorc @@ -0,0 +1,21 @@ +## Here is an example for Python. +## +syntax "go" "\.go$" +header "^#!.*/python[-0-9._]*" + +icolor brightblue "def [0-9A-Z_]+" +color brightcyan "\<(break|default|func|interface|select|case|defer|go|map|struct|chan|else|goto|package|switch|const|fallthrough|if|range|type|continue|for|import|return|var)\>" + +## String highlighting. You will in general want your comments and +## strings to come last, because syntax highlighting rules will be +## applied in the order they are read in. +color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" +## +## This string is VERY resource intensive! +color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" + + +## Comment highlighting +color brightblue "//.*" +color brightblue start="/\*" end="\*/" + -- 2.39.5