diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2015-05-11 15:05:13 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2015-05-11 15:05:13 +0200 |
commit | 271b63d71707720ad0d35590b8cb50f8f8f43014 (patch) | |
tree | 1b71daa457afc68465f66ee2afc9a00c1380f23d /syntax/go.vim | |
parent | acd7ce59503b22ac7663fc25776efe25e266f1d4 (diff) | |
download | vim-polyglot-1.13.2.tar.gz vim-polyglot-1.13.2.zip |
Updatev1.13.2
Diffstat (limited to 'syntax/go.vim')
-rw-r--r-- | syntax/go.vim | 28 |
1 files changed, 13 insertions, 15 deletions
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 |