summaryrefslogtreecommitdiff
path: root/misc/vim/syntax
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-02-14 13:23:51 +0100
committerOndřej Surý <ondrej@sury.org>2011-02-14 13:23:51 +0100
commit758ff64c69e34965f8af5b2d6ffd65e8d7ab2150 (patch)
tree6d6b34f8c678862fe9b56c945a7b63f68502c245 /misc/vim/syntax
parent3e45412327a2654a77944249962b3652e6142299 (diff)
downloadgolang-upstream/2011-02-01.1.tar.gz
Imported Upstream version 2011-02-01.1upstream/2011-02-01.1
Diffstat (limited to 'misc/vim/syntax')
-rw-r--r--misc/vim/syntax/go.vim13
1 files changed, 10 insertions, 3 deletions
diff --git a/misc/vim/syntax/go.vim b/misc/vim/syntax/go.vim
index 7adbe8e35..7507cada2 100644
--- a/misc/vim/syntax/go.vim
+++ b/misc/vim/syntax/go.vim
@@ -70,8 +70,8 @@ hi def link goRepeat Repeat
syn keyword goType chan map bool string
syn keyword goSignedInts int int8 int16 int32 int64
syn keyword goUnsignedInts byte uint uint8 uint16 uint32 uint64 uintptr
-syn keyword goFloats float float32 float64
-syn keyword goComplexes complex complex64 complex128
+syn keyword goFloats float32 float64
+syn keyword goComplexes complex64 complex128
hi def link goType Type
hi def link goSignedInts Type
@@ -85,7 +85,7 @@ syn match goType /\<func\>/
syn match goDeclaration /^func\>/
" Predefined functions and values
-syn keyword goBuiltins append cap close closed cmplx copy imag len
+syn keyword goBuiltins append cap close closed complex copy imag len
syn keyword goBuiltins make new panic print println real recover
syn keyword goConstants iota true false nil
@@ -198,4 +198,11 @@ endif
hi def link goExtraType Type
hi def link goSpaceError Error
+" Search backwards for a global declaration to start processing the syntax.
+"syn sync match goSync grouphere NONE /^\(const\|var\|type\|func\)\>/
+
+" There's a bug in the implementation of grouphere. For now, use the
+" following as a more expensive/less precise workaround.
+syn sync minlines=500
+
let b:current_syntax = "go"