- rm -rf ~/.config/nvim
- cd ~/.config
- git clone -depth=1 https://github.com/dairongpeng/nvim.git
- 添加vim-go插件和NERDTree插件
~ git submodule add https://github.com/fatih/vim-go.git pack/vendor/start/vim-go
~ git submodule add https://github.com/preservim/nerdtree.git pack/vendor/start/nerdtree
- 更新插件(以更新vim-go举例)
~ git submodule update --remote pack/vendor/start/vim-go
- 删除插件(以vim-go举例)
~ git rm -rf pack/vendor/start/vim-go
键入nvim test.go
, 进入Normal模式,执行:GoInstallBinaries,等待安装完成
~ brew install vim
vim配置文件在~/.vimrc
中、vim的默认资源文件夹在~/.vim
中。
~ touch ~/.vimrc
~ sh -c 'curl -fLo ~/.vim/autoload/plug.vim --create-dirs raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
" 安装的插件放到~/.vim/plugged内
call plug#begin("~/.vim/plugged")
Plug 'fatih/vim-go', { 'do' : ':GoUpdateBinaries' }
Plug 'preservim/nerdtree'
" 装fzf可执行文件
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
" fzf.vim依赖fzf,和ripgrep可执行文件。fzf上一步已经安装,ripgrep可以自行安装
Plug 'junegunn/fzf.vim'
Plug 'airblade/vim-rooter'
call plug#end()
vim配置参考vimrc
文件。