2014年7月23日 星期三

[Go] GoLang 資源整理

目前正在學 Google Go,慢慢的有發現甚麼不錯的學習資源就擺進來...

網站

  1. The Go Programming Language
    Go 的官方網站,首頁還有 playground 的環境可以直接寫些簡單的程式做練習用,原生 library 的文件都可以在這邊找到。

開發工具


Sublime Text

  1. 在 Ubuntu Linux 下安裝及使用 Sublime Text 2 / 3 - 玩物尚誌
  2. 基礎知識- 在Ubuntu 14.04 中配置Sublime Text 3 的Golang 開發環境- GoLove - 博客園
  3. 在 Sublime Text 2/3 設定 Inconsolata 字型 | akiratw Blog
  4. Code Completion and Google App Engine (Bug in GoSublime or GoCode?) · Issue #418 · DisposaBoy/GoSublime · GitHub


電子書

  1. Go Web 編程 @ github
    這是對岸的朋友寫的,其實就是「21 世紀的 C 語言:史上最簡潔程式語言 Go Web 開發到底」的原始版本。(書寫的還不錯,有心學習的朋友就買書來支持一下囉!)

2014年7月13日 星期日

[Go] 在 Ubuntu 14.04 中設定 Go Syntax Highlight for Vim

為了在 Ubuntu 用 vim 編輯 *.go 檔案時有 syntax highlight 的效果

要額外安裝 vim-syntax-go 套件,並做些許設定

詳細步驟如下:

1、安裝 vim & vim-syntax-go

2、找到 go.vim 檔案 (在我的電腦裡是在 /usr/share/vim/addons/syntax 目錄中),並放到 ~/.vim/syntax 目錄中

3、編輯 ~/.vim/ftdetect/go.vim 檔案,並輸入以下內容
au BufRead,BufNewFile *.go set filetype=go
4、編輯 ~/.vimrc 檔案,輸入以下內容
" size of a hard tabstop
set tabstop=4
" size of an "indent"
set shiftwidth=4
" a combination of spaces and tabs are used to simulate tab stops at a width
" other than the (hard)tabstop
set softtabstop=4
set rtp+=/usr/share/vim/addons
filetype plugin indent on
syntax on
view raw .vimrc hosted with ❤ by GitHub

最後登出再登入就完工囉!