这里通过新建香港实例打包好镜像后复制到内地(涉及到github资源下载)

查看vim版本

vim --version

  1. VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun 06 2019 17:31:41)
  2. Included patches: 1-1453
  3. Modified by pkg-vim-maintainers@lists.alioth.debian.org
  4. Compiled by pkg-vim-maintainers@lists.alioth.debian.org
  5. Huge version without GUI. Features included (+) or not (-):
  6. +acl +farsi +mouse_sgr -tag_any_white
  7. +arabic +file_in_path -mouse_sysmouse -tcl
  8. +autocmd +find_in_path +mouse_urxvt +termguicolors
  9. -autoservername +float +mouse_xterm +terminal
  10. -balloon_eval +folding +multi_byte +terminfo
  11. +balloon_eval_term -footer +multi_lang +termresponse
  12. -browse +fork() -mzscheme +textobjects
  13. ++builtin_terms +gettext +netbeans_intg +timers
  14. +byte_offset -hangul_input +num64 +title
  15. +channel +iconv +packages -toolbar
  16. +cindent +insert_expand +path_extra +user_commands
  17. -clientserver +job -perl +vertsplit
  18. -clipboard +jumplist +persistent_undo +virtualedit
  19. +cmdline_compl +keymap +postscript +visual
  20. +cmdline_hist +lambda +printer +visualextra
  21. +cmdline_info +langmap +profile +viminfo
  22. +comments +libcall -python +vreplace
  23. +conceal +linebreak +python3 +wildignore
  24. +cryptv +lispindent +quickfix +wildmenu
  25. +cscope +listcmds +reltime +windows
  26. +cursorbind +localmap +rightleft +writebackup
  27. +cursorshape -lua -ruby -X11
  28. +dialog_con +menu +scrollbind -xfontset
  29. +diff +mksession +signs -xim
  30. +digraphs +modify_fname +smartindent -xpm
  31. -dnd +mouse +startuptime -xsmp
  32. -ebcdic -mouseshape +statusline -xterm_clipboard
  33. +emacs_tags +mouse_dec -sun_workshop -xterm_save
  34. +eval +mouse_gpm +syntax
  35. +ex_extra -mouse_jsbterm +tag_binary
  36. +extra_search +mouse_netterm +tag_old_static
  37. system vimrc file: "$VIM/vimrc"
  38. user vimrc file: "$HOME/.vimrc"
  39. 2nd user vimrc file: "~/.vim/vimrc"
  40. user exrc file: "$HOME/.exrc"
  41. defaults file: "$VIMRUNTIME/defaults.vim"
  42. fall-back for $VIM: "/usr/share/vim"
  43. Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wdate-time -g -O2 -fdebug-prefix-map=/build/vim-8l5tlu/vim-8.0.1453=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
  44. Linking: gcc -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl -L/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu -lpython3.6m -lpthread -ldl -lutil -lm

查看linux版本

lsb_release
LSB Version: core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch

下载并解压Golang

wget https://dl.google.com/go/go1.12.linux-amd64.tar.gzsudo tar xzvf go1.12.linux-amd64.tar.gz -C /usr/local/

添加环境变量

vim /etc/profile.d/go.sh

  1. export GOPATH=$HOME/go
  2. export GOROOT=/usr/local/go
  3. export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

使环境变量生效

source /etc/profile

添加vimrc文件

vim .vimrc

  1. " Specify a directory for plugins
  2. " - For Neovim: ~/.local/share/nvim/plugged
  3. " - Avoid using standard Vim directory names like 'plugin'
  4. call plug#begin('~/.vim/plugged')
  5. " Make sure you use single quotes
  6. " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
  7. Plug 'junegunn/vim-easy-align'
  8. " Any valid git URL is allowed
  9. Plug 'https://github.com/junegunn/vim-github-dashboard.git'
  10. " Multiple Plug commands can be written in a single line using | separators
  11. Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
  12. " On-demand loading
  13. Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
  14. Plug 'jistr/vim-nerdtree-tabs'
  15. Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
  16. " Using a non-master branch
  17. Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
  18. " Using a tagged release; wildcard allowed (requires git 1.9.2 or above)
  19. Plug 'fatih/vim-go', { 'do': 'GoUpdateBinaries' }
  20. " Plugin options
  21. Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
  22. " Plugin outside ~/.vim/plugged with post-update hook
  23. Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
  24. " Unmanaged plugin (manually installed and updated)
  25. Plug '~/my-prototype-plugin'
  26. " Initialize plugin system
  27. Plug 'majutsushi/tagbar'
  28. Plug 'vim-airline/vim-airline'
  29. Plug 'Valloric/YouCompleteMe'
  30. " 配色方案
  31. " colorscheme neodark
  32. Plug 'KeitaNakamura/neodark.vim'
  33. " colorscheme monokai
  34. Plug 'crusoexia/vim-monokai'
  35. " colorscheme github
  36. Plug 'acarapetis/vim-colors-github'
  37. " colorscheme one
  38. Plug 'rakr/vim-one'
  39. call plug#end()

下载Plug插件

curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

通过Plug安装插件

vim +PlugInstall

参考链接