分享
  1. 首页
  2. 文章

vim 安装vim-go 打造GOLANG 专用IDE

samxx8 · · 28119 次点击 · · 开始浏览
这是一个创建于 的文章,其中的信息可能已经有所发展或是发生改变。

分两步:

第一步:安装vim插件管理器Vundle

第二步:安装vim-go插件。

另外:我也写了一个自动安装的脚本。手懒的朋友,可以自行下载使用:https://github.com/aimin/InstallvimGo.git

---------------------------------------------------------------------------------------

开始:

第一步:安装Vundle

根据Vundle的安装说明,首先安装Vundle:

$ git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim

然后对.vimrc进行配置,将Vundle的相关配置置在最开始处,下面只显示关于Vundle的相关配置:

对.vimrc进行配置,将Vundle的相关配置置在最开始处,下面只显示关于Vundle的相关配置(详细参考Vundle的README.MD):

  1. " -------------
  2. " Vundle
  3. " https://github.com/gmarik/Vundle.vim
  4. " -------------
  5. set nocompatible " be iMproved, required
  6. filetype off " required
  7. " set the runtime path to include Vundle and initialize
  8. set rtp+=~/.vim/bundle/Vundle.vim
  9. call vundle#begin()
  10. " alternatively, pass a path where Vundle should install plugins
  11. "call vundle#begin('~/some/path/here')
  12. " let Vundle manage Vundle, required
  13. Plugin 'gmarik/Vundle.vim'
  14. " The following are examples of different formats supported.
  15. " Keep Plugin commands between vundle#begin/end.
  16. " plugin on GitHub repo
  17. ""Plugin 'tpope/vim-fugitive'
  18. " plugin from http://vim-scripts.org/vim/scripts.html
  19. ""Plugin 'L9'
  20. " Git plugin not hosted on GitHub
  21. ""Plugin 'git://git.wincent.com/command-t.git'
  22. " git repos on your local machine (i.e. when working on your own plugin)
  23. ""Plugin 'file:///home/gmarik/path/to/plugin'
  24. " The sparkup vim script is in a subdirectory of this repo called vim.
  25. " Pass the path to set the runtimepath properly.
  26. ""Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
  27. " Avoid a name conflict with L9
  28. ""Plugin 'user/L9', {'name': 'newL9'}
  29. " Install Vim-go
  30. Plugin 'fatih/vim-go'
  31. " All of your Plugins must be added before the following line
  32. call vundle#end() " required
  33. filetype plugin indent on " required
  34. " To ignore plugin indent changes, instead use:
  35. "filetype plugin on
  36. "
  37. " Brief help
  38. " :PluginList - lists configured plugins
  39. " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
  40. " :PluginSearch foo - searches for foo; append `!` to refresh local cache
  41. " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
  42. "
  43. " see :h vundle for more details or wiki for FAQ
  44. " Put your non-Plugin stuff after this line

第二步:安装vim-go (详细查看vim-go的README.MD)

git clone https://github.com/fatih/vim-go.git ~/.vim/bundle/vim-go 注意路径
在上述~/.vimrc里增加下面一行。
Plugin 'fatih/vim-go'

至此安装完成。
打开.go 文件看看效果吧!



有疑问加站长微信联系(非本文作者)

本文来自:CSDN博客

感谢作者:samxx8

查看原文:vim 安装vim-go 打造GOLANG 专用IDE

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

关注微信
28119 次点击
暂无回复
添加一条新回复 (您需要 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传

用户登录

没有账号?注册
(追記) (追記ここまで)

今日阅读排行

    加载中
(追記) (追記ここまで)

一周阅读排行

    加载中

关注我

  • 扫码关注领全套学习资料 关注微信公众号
  • 加入 QQ 群:
    • 192706294(已满)
    • 731990104(已满)
    • 798786647(已满)
    • 729884609(已满)
    • 977810755(已满)
    • 815126783(已满)
    • 812540095(已满)
    • 1006366459(已满)
    • 692541889

  • 关注微信公众号
  • 加入微信群:liuxiaoyan-s,备注入群
  • 也欢迎加入知识星球 Go粉丝们(免费)

给该专栏投稿 写篇新文章

每篇文章有总共有 5 次投稿机会

收入到我管理的专栏 新建专栏