Vim+golang development environment Construction under MAC

Source: Internet
Author: User
Tags gdb debugger
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

    1. 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”

    2. 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

    3. 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 ...

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.