From 271b63d71707720ad0d35590b8cb50f8f8f43014 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Mon, 11 May 2015 15:05:13 +0200 Subject: Update --- syntax/go.vim | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'syntax/go.vim') diff --git a/syntax/go.vim b/syntax/go.vim index 7b0fbaf5..e9634ba6 100644 --- a/syntax/go.vim +++ b/syntax/go.vim @@ -52,7 +52,7 @@ if !exists("g:go_highlight_trailing_whitespace_error") endif if !exists("g:go_highlight_operators") - let g:go_highlight_operators = 1 + let g:go_highlight_operators = 0 endif if !exists("g:go_highlight_functions") @@ -236,20 +236,18 @@ hi def link goTodo Todo " Operators; if g:go_highlight_operators != 0 - syn match goOperator /:=/ - syn match goOperator />=/ - syn match goOperator /<=/ - syn match goOperator /==/ - syn match goOperator /!=/ - syn match goOperator /+=/ - syn match goOperator /-=/ - syn match goOperator /\s>\s/ - syn match goOperator /\s<\s/ - syn match goOperator /\s+\s/ - syn match goOperator /\s-\s/ - syn match goOperator /\s\*\s/ - syn match goOperator /\s\/\s/ - syn match goOperator /\s%\s/ + " match single-char operators: - + % < > ! & | ^ * = + " and corresponding two-char operators: -= += %= <= >= != &= |= ^= *= == + syn match goOperator /[-+%<>!&|^*=]=\?/ + " match / and /= + syn match goOperator /\/\%(=\|\ze[^/*]\)/ + " match two-char operators: << >> &^ + " and corresponding three-char operators: <<= >>= &^= + syn match goOperator /\%(<<\|>>\|&^\)=\?/ + " match remaining two-char operators: := && || <- ++ -- + syn match goOperator /:=\|||\|<-\|++\|--/ + " match ... + syn match goOperator /\.\.\./ endif hi def link goOperator Operator -- cgit v1.2.3