Neovim中vim-plug默认安装插件的位置查询
找到vim-plug管理的Neovim插件目录
1. 默认路径(无自定义配置时)
vim-plug在Neovim中的默认插件安装目录分系统:
- Linux/macOS:
~/.local/share/nvim/site/plugged/ - Windows:
%USERPROFILE%\AppData\Local\nvim-data\site\plugged\
2. 在Neovim内直接查询根目录
打开Neovim,执行以下命令,会直接返回vim-plug当前使用的插件安装根路径:
:echo plug#directory()
3. 定位单个插件的具体路径
如果要找某款特定插件的目录,比如nvim-tree.lua,执行:
:echo findfile('plugin/nvim-tree.vim', &runtimepath)
返回结果中,去掉末尾的plugin/xxx.vim部分,剩下的就是该插件的根目录。
4. 终端直接验证路径
- Linux/macOS终端:
cd ~/.local/share/nvim/site/plugged/ ls
- Windows命令提示符:
cd %USERPROFILE%\AppData\Local\nvim-data\site\plugged\ dir
直接进入对应插件文件夹修改内容即可,无需重新克隆,下次启动Neovim会自动加载修改后的版本。
内容的提问来源于stack exchange,提问作者Ritvik Aryan Kalra
相关产品推荐
相关产品推荐

