Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想设置我的 .vimrc 以便在使用目录参数从命令行调用 vim(或 MacVim)时打开 NERDTree,但在使用文件参数调用 vim 时关闭。我查看了 vim 的内置变量列表,但找不到任何看起来很有希望的东西。
arglist根据 Alligator 的建议进行查找。结束了以下内容:
arglist
if argc() > 0 && isdirectory(argv(0)) autocmd VimEnter * silent NERDTree endif