This is a creation in Article, where the information may have evolved or changed.
It took a lot of effort today to fix the development environment for VIM Golang under Mac, Mark.
Basic Reference Http://studygolang.com/articl ...
There are a few things to be aware of
I installed under the Mac, the current Mac default Vim version is 7.3, unable to install YCM (requires 7.4+), so first install Vim: brew install vim
. After installation, add the installed bin path to the system path.
export PATH=$PATH:“your vim bin path”
YCM installation of the best reference Https://github.com/Valloric/Y ...
Some of the Python installation packages are required for installation, pip install future
pip install requests
and others do not remember. You also need to install brew install cmake
. Then execute./install.py --gocode-completer
When using Ultisnips, it took a long time to understand how to use it to unfold and see my. vimrc file
" YCM settingslet g:ycm_key_list_select_completion = ['', '']let g:ycm_key_list_previous_completion = ['']let g:ycm_key_invoke_completion = ''" UltiSnips settinglet g:UltiSnipsExpandTrigger="<Tab>"let g:UltiSnipsJumpForwardTrigger="<c-j>"let g:UltiSnipsJumpBackwardTrigger="<c-k>"
YCM and Ultisnips tab conflict, but the original class copied the settings in the post will be error no mapping and so on, look up some information on the Internet, the settings are changed to as above. While in use, typing im will appear some tips to import <snip> import (...)
Select this directly press TAB will not expand, click OK, will fill the import, at this time the above hint is still there, at this time, press the TAB key will be expanded, as follows:
import ( "package")
At this point, the Golang environment configuration is complete
Finally, for the use of GDB debugger under Mac, refer to
Http://studygolang.com/articl ...
Http://www.time-track.cn/inst ...