2013-12-17 wcdj
之前总结过在subl中使用Golang,《GoLang及Sublime Text 2之Mac OS X 10.8.4开发环境安装 》。其实Golang的安装包中已经包含了支持Vim的编写插件,配置方法很简单,如下文所述。
The standard Go distribution includes a Go Syntax file for Vim in go/misc/vim/
.
Place $GOROOT/misc/vim/Syntax/go.vim
in ~/.vim/Syntax/
and put the following in ~/.vim/ftdetect/go.vim
:
au BufRead,BufNewfile *.go set filetype=goExtras and Alternative files
An alternative indent file for Vim by Alecs King can be found here.
autocompletionThe gocode daemon by nsf includes a vim script to do autocompletion.
OtherSee the vim-golang repo in Github foralternative Syntax highlight,auto-indentation,gofmt and other useful scriptsand plugins.
And this reddit post for varIoUs ways to integrate gofmt
with vim.
参考:
[1] http://go-lang.cat-v.org/text-editors/vim/
总结以上是内存溢出为你收集整理的GoLang之Gvim/Vim配置全部内容,希望文章能够帮你解决GoLang之Gvim/Vim配置所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)