Mac Configuration Vim-go

Source: Internet
Author: User

Basic setup information (reference URL: http://hessian.cn/p/1026.html): "or configure/.VIMRC file. Syn on" syntax supports set laststatus=2 "Always show status bar set tabstop=2" The length of a tab set softtabstop=2 "a tab length (can be greater than TabStop) set shiftwidth=2" one indent length set Expandtab "Use spaces instead of tab set Smarttab" Smart tab SET autoindent "Auto indent set Smartindent" can only indent set number "show line numbers set ruler" display position indicator set BACKUPDIR=/TMP "Set backup file directory set directory =/tmp "Set temporary file directory set ignorecase" When retrieving ignore case set HLS "search highlighting matches set HELPLANG=CN" Help system set to Chinese set Foldmethod=syntax "code folding? Vundle Plugin Management plugin git address:https://github.com/gmarik/vundle.vimcan command to run: $ git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/vundle.vimand then modify the add part of the code into ~/.VIMRC ? vim-go plug-in Golang management pluginGit address:https://github.com/fatih/vim-go Well, the simple vim-go configuration environment is fine. Focus on the problems encountered: 1. Goroot. Gopath. Gopath. GOBIN. Goarch. Configuration because I am operating under the Mac, although the Mac is a UNIX retrofit, you need to be careful not to write Linux. Goarch needs to be written in Darwin. Directly on the configuration diagram. SOURCE ~/.bash_profile effective immediately 2. Since I'm using iterm instead of bash, I've installed ZSHRC, so the changes need to be in the. zshrc file. In fact, we can add on the. ZSHRC: ~/.bash_profile file, the principle is: every time you open terminal will go to read this configuration file, so, we add a reference path, so that we can read the ~/.bash_profile file again.  Well, here can be installed force, is to configure the just quoted. bah_profile file, write: echo "Hello, good fun today." ; In this way, each time you open terminal, you will be outputting this sentence. 3. Incidentally, the setup of the Gopath. Gopath is the location of our project, whether it is the Gocode plugin we downloaded, or the third-party library used later, the go get command will be downloaded here, and our project can be directly referenced without the need to move the file xxxx or something like any other language. It's very convenient. Basically, the vim-go configuration is like this, in the back of the fish block run it.

Mac Configuration Vim-go

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.