如何在 Vim 中创建文件夹(优先使用 NERDTree)?
我知道如何在 NERDTree 中创建重命名、删除和移动文件(只需按 m,然后按 [a、d 或 m]
)。但我不知道如何创建文件夹。
有谁知道如何在 NERDTree 上(或者只是以 vim 的原生“方式”)执行此操作?
I know how to create rename, delete and move files in NERDTree (just pressing m then either [a, d, or m]
). But I can't figure out how to create a folder.
Does anybody know how to do this on NERDTree (or just in vim's native "way")?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用
m + a
并在要创建的子节点的名称上添加尾随/
。例如,
m + a + foo
创建文件foo
。m + a + foo/
创建目录foo
。You use
m + a
and put a trailing/
on the name of the child node you want to create.E.g.,
m + a + foo
creates the filefoo
.m + a + foo/
creates the directoryfoo
.好吧,你总是可以这样做:
这有帮助吗?
Well, you can always do:
Does that help?
在 NERDTree 窗口中,按“m”;您应该在底部看到一个菜单。输入“a”以添加子节点。现在输入您要创建的目录,确保在末尾添加“/”,否则脚本将创建一个文件。
When in the NERDTree window, press 'm'; you should see a menu at the bottom. Type in 'a' for add childnode. Now input the directory you want to create, making sure to add a '/' at the end, otherwise the script would create a file.