大家常用的 vim plugin manager 是 Vundle
但是最近好像比較流行 vim-plug
看到大家都是推薦這個
所以就先安裝這個一次
為了要安裝 vim-plug 在 neovim 裡面
得先建立屬於 nvim 的設定檔資料夾
mkdir -p ~/.config/nvim
並將 vim-plug 檔案下載至 裡面
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
之後再新增一個檔案
nvim ~/.config/nvim/init.vim
檔案內容如下
先裝個 nerdtree 可以方便的在 nvim 中切換檔案
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call plug#begin('~/.local/share/nvim/plugged') | |
Plug 'scrooloose/nerdtree' | |
call plug#end() |
輸入完之後
關閉檔案重新打開 nvim
輸入
:PlugInstall
就會開始安裝 Plugin
安裝好後
輸入
:NERDTree
如果右邊多出現一排檔案目錄就是成功了
沒有留言:
張貼留言