Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
72a3f532
Commit
72a3f532
authored
Mar 16, 2010
by
David Symonds
Committed by
Russ Cox
Mar 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new complex types, functions and literals to Vim syntax file.
R=rsc CC=golang-dev
https://golang.org/cl/224042
parent
acfd7b8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
go.vim
misc/vim/go.vim
+13
-2
No files found.
misc/vim/go.vim
View file @
72a3f532
...
...
@@ -71,11 +71,13 @@ 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
hi
def link goType Type
hi
def link goSignedInts Type
hi
def link goUnsignedInts Type
hi
def link goFloats Type
hi
def link goComplexes Type
" Treat func specially: it's a declaration at the start of a line, but a type
" elsewhere. Order matters here.
...
...
@@ -83,7 +85,8 @@ syn match goType /\<func\>/
syn
match
goDeclaration
/^func\>/
" Predefined functions and values
syn
keyword goBuiltins cap
close
closed convert copy len
make
new
panic panicln print println
syn
keyword goBuiltins cap
close
closed cmplx copy imag len
make
syn
keyword goBuiltins
new
panic panicln print println real
syn
keyword goConstants iota true false nil
hi
def link goBuiltins Keyword
...
...
@@ -146,10 +149,18 @@ hi def link Integer Number
" Floating point
syn
match
goFloat
"\<\d\+\.\d*\([Ee][-+]\d\+\)\?\>"
syn
match
goFloat
"\<\.\d\+\([Ee][-+]\d\+\)\?\>"
syn
match
goFloat
"\<\d\+[Ee][-+]\d\+"
syn
match
goFloat
"\<\d\+[Ee][-+]\d\+
\>
"
hi
def link goFloat Float
" Imaginary literals
syn
match
goImaginary
"\<\d\+i\>"
syn
match
goImaginary
"\<\d\+\.\d*\([Ee][-+]\d\+\)\?i\>"
syn
match
goImaginary
"\<\.\d\+\([Ee][-+]\d\+\)\?i\>"
syn
match
goImaginary
"\<\d\+[Ee][-+]\d\+i\>"
hi
def link goImaginary Number
" Spaces after "[]"
if
go_highlight_array_whitespace_error
!=
0
syn
match
goSpaceError display
"\(\[\]\)\@<=\s\+"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment