golang - vim的插件写go

浏览:42日期:2023-07-28

问题描述

我找vim的插件写go的程序

问题解答

回答1:

目前最好的插件,没有之一

https://github.com/fatih/vim-go

这个不仅仅是语法高亮,还提供了补全,跳转函数等。

看看它的命令列表 就可以看出功能很全

:GoImport <path>:GoImportAs <localname> <path>:GoDrop <path>:GoDisableGoimports:GoEnableGoimports:GoLint:GoDoc <identifier>:GoDocBrowser <identifier>:GoFmt:GoVet:GoDef <identifier>:GoRun <expand>:GoBuild:GoInstall:GoPlay:GoTest:GoErrCheck:GoFiles:GoDeps:GoUpdateBinaries:GoOracleDescribe:GoOracleCallees:GoOracleCallers:GoOracleCallgraph:GoOracleImplements:GoOracleChannelPeers回答2:

gocode https://github.com/nsf/gocode

回答3:

这个不是 Go 自带了么。

>>> pacman -Ql go | grep vimfiles | wc -l17回答4:

https://github.com/caixw/VimIDE 试一下这个,集成了gocode,gotag

回答5:

https://github.com/InfoGeeker/go-vim-dict

关于Go的dict。

相关文章: