您需要从工作树的顶层运行此命令

Kat*_*tsu 13 vim

我正在尝试安装utilsnips.

当我输入:

cd ~/.vim/ 
git submodule add https://github.com/SirVer/ultisnips bundle/ultisnips 
Run Code Online (Sandbox Code Playgroud)

我收到这条消息:

You need to run this command from the toplevel of the working tree.
Run Code Online (Sandbox Code Playgroud)

为什么?我怎么能避免呢?

cfo*_*ish 11

您的.vim目录可能不是git目录.git简单地使它成为一个目录:

git init
Run Code Online (Sandbox Code Playgroud)

然后你可以运行:

git submodule add https://github.com/SirVer/ultisnips bundle/ultisnips
Run Code Online (Sandbox Code Playgroud)


bir*_*ch3 5

您可能正在子目录中运行命令。确保您位于与.git目录相同级别的目录中。