Golang vim golang 配置

"https://www.jianshu.com/p/923aec861af3

set number
set cursorline
set langmenu=zh_CN.UTF-8

syntax on
set nowrap
set fileformat=unix
set tabstop=4
set shiftwidth=4
set showmatch
set scrolloff=5

set mouse=a
set selectmode=mouse,key
set matchtime=5
set ignorecase
set incsearch
set hlsearch
set noexpandtab
set whichwrap+=<,>,h,l
set autoread
imap jk <Esc>
imap kj <Esc>

set nocompatible " be iMproved, required
filetype off " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
"Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}

Plugin 'fatih/vim-go'
Plugin 'Valloric/YouCompleteMe'
Plugin 'Auto-Pairs'
Plugin 'jeetsukumaran/vim-indentwise'
Plugin 'darfink/vim-plist'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line

"colorscheme
"colorscheme murphy
colorscheme morning
set transparency=10

‘Valloric/YouCompleteMe’ 安装

# 下载 (在 `~/.vim/bundle` 目录下)
git clone --recursive https://github.com/Valloric/YouCompleteMe.git

安装 CMake

brew install CMake

带 Go 语言语义支持的版本

cd ~/.vim/bundle/YouCompleteMe
./install.sh --gocode-completer

vim 下安装命令

PluginInstall

参考

Mac 下配置 Vim vundle 代码补全 YouCompleteMe 等插件
一步一步带你安装史上最难安装的 vim 插件 —— YouCompleteMe