如何在 Vim 中创建文件夹(优先使用 NERDTree)?

发布于 2024-09-06 21:27:51 字数 171 浏览 1 评论 0原文

我知道如何在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

花之痕靓丽 2024-09-13 21:27:51

您可以使用 m + a 并在要创建的子节点的名称上添加尾随 /

例如,m + a + foo 创建文件foom + 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 file foo. m + a + foo/ creates the directory foo.

不一样的天空 2024-09-13 21:27:51

好吧,你总是可以这样做:

:!mkdir <directory>

这有帮助吗?

Well, you can always do:

:!mkdir <directory>

Does that help?

楠木可依 2024-09-13 21:27:51

在 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文