From: acevest Date: Sun, 4 Jan 2015 09:41:31 +0000 (+0800) Subject: ... X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=e62210f703b1ff48947271737b62cd8980c218ff;p=acecode.git ... --- diff --git a/learn/doc/vimrc b/learn/doc/vimrc index 71a033a..4661c7d 100644 --- a/learn/doc/vimrc +++ b/learn/doc/vimrc @@ -76,3 +76,17 @@ hi CursorLine ctermbg=lightcyan cterm=BOLD "set cursorcolumn "hi CursorColumn ctermbg=lightgreen cterm=BOLD set viminfo='1000,<500 + +" 需要安装bundle/vundle vim-go 到~/.vim/ +"filetype off +"set rtp+=~/.vim/bundle/vundle/ +"call vundle#rc() +"Bundle 'gmarik/vundle' +"Plugin 'fatih/vim-go' +"filetype plugin indent on + +" 以下是让mac vim支持中文输入 +set encoding=utf-8 " 默认UTF-8 +set fenc=utf-8 " 默认以UTF-8新建文件 +set fileencodings=utf-8,cp936 " 打开文件编码按顺序匹配 +set nobomb " diff --git a/learn/go/README b/learn/go/README new file mode 100644 index 0000000..e5856ad --- /dev/null +++ b/learn/go/README @@ -0,0 +1 @@ +ln -s ./ /Users/Ace/go/src/learn diff --git a/learn/go/hello/hello.go b/learn/go/hello/hello.go index a36de8e..49c33d0 100644 --- a/learn/go/hello/hello.go +++ b/learn/go/hello/hello.go @@ -1,7 +1,12 @@ package main import "fmt" +import "math/rand" +import "time" func main() { - fmt.Printf("hello world\n") + rand.Seed(time.Now().UnixNano()) + for i := 0; i < rand.Intn(10); i++ { + fmt.Printf("Hello World\n") + } }