Skip to content

Commit

Permalink
Merge pull request #69 from linkernetworks/alex/AddVimSetting
Browse files Browse the repository at this point in the history
Add vim setting
  • Loading branch information
John-Lin authored Jul 6, 2018
2 parents 1f307fb + b089baa commit d7e2263
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
15 changes: 14 additions & 1 deletion developers/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ Vagrant.configure("2") do |config|
config.vm.define vm_name = 'vortex'

config.vm.provision "file", source: "configs/docker.conf", destination: "/tmp/override.conf"
config.vm.provision "file", source: "configs/.vimrc", destination: "$HOME/.vimrc"
config.vm.provision "shell", privileged: false, inline: <<-SHELL
set -e -x -u
sudo mkdir -p "/etc/systemd/system/docker.service.d/"
sudo cp "/tmp/override.conf" "/etc/systemd/system/docker.service.d/override.conf"
sudo apt-get update
sudo apt-get install -y vim git build-essential openvswitch-switch tcpdump unzip tig nfs-common
sudo apt-get install -y vim git cmake build-essential openvswitch-switch tcpdump unzip tig nfs-common
# Env for proto
PROTOC_RELEASE="https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip"
PROTOC_TARGET="${HOME}/protoc"
Expand Down Expand Up @@ -70,6 +71,18 @@ Vagrant.configure("2") do |config|
if [ ! -d "${PROTOC_TARGET}" ]; then curl -fsSL "$PROTOC_RELEASE" > "${PROTOC_TARGET}.zip"; fi
if [ -f "${PROTOC_TARGET}.zip" ]; then unzip "${PROTOC_TARGET}.zip" -d "${PROTOC_TARGET}"; fi
go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
# install vim environment
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vim +PluginInstall +qall
# init YouCompleteMe vim plugin
sudo apt-get install -y python-dev python3-dev
cd ~/.vim/bundle/YouCompleteMe
./install.py --go-completer
# install govendor package manager
go get -u github.com/kardianos/govendor
SHELL

config.vm.network :private_network, ip: "172.17.8.100"
Expand Down
23 changes: 23 additions & 0 deletions developers/configs/.vimrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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'
Plugin 'c9s/helper.vim'
Plugin 'c9s/treemenu.vim'
Plugin 'c9s/vikube.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'c9s/hypergit.vim'
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
Plugin 'fatih/vim-go', {'do': ':GoInstallBinaries'}
Plugin 'Valloric/YouCompleteMe'
Plugin 'scrooloose/nerdtree'

call vundle#end() " required
filetype plugin indent on " required

0 comments on commit d7e2263

Please sign in to comment.