OS X 上的 VIM 与树

发布于 2025-01-04 19:56:59 字数 201 浏览 7 评论 0原文

我想在 Mac 上进行文本编辑,我想要的是:

  • 内置 VIM 编辑器
  • 树形视图可以更快地打开文件并在文件之间切换

我应该使用 vim 和树插件吗?或者有没有好的内置VIM的文本编辑程序?

您对这种组合有何体验?您还有其他推荐吗?

I want to do text editing on a Mac and what I'd like to have is:

  • VIM editor built in
  • a tree view to open and switch between files more quickly

Should I go with vim and a tree plugin? Or is there a good text editing program with VIM built-in?

What are your experiences with that combination? Do you have any other recommendation?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(3

岛歌少女 2025-01-11 19:57:00

你试过 gvim for mac http://macvim.org/OSX/index.php

我不知道我没有 Mac,但确实在各种 Windows 和 Linux 安装上使用 gvim。

Have you tried gvim for mac http://macvim.org/OSX/index.php

I don't have a mac but do use gvim on various windows and linux installs.

甜心小果奶 2025-01-11 19:57:00

使用 VIM 浏览器

Vim 有标准安装的文件浏览器,要在左侧打开它,首先用 vim 打开文件并执行:

:vs

这会将窗口分成两半,并显示相同的文件,然后

:E

:Explore

: 顶部是帮助,标准 vim 导航可以打开文件或目录,只需按 Enter 键即可。要在那里启用树状视图,您需要将其添加到 ~/.vimrc 中:

g:netrw_liststyle=3

我从未尝试过上述解决方案,但这样做的好处是您可以使用开箱即用的 vim 在几分钟内使其工作。

奖励功能

如果您使用 vim 打开目录,只需按 i 即可更改模式。

Use VIM explorer

Vim has file explorer with standard installation, to open it on the left side, first open file with vim and do:

:vs

This will split the window in half with the same file, then:

:E

or

:Explore

there is help at the top and standard vim navigation works to open file or directory just hit Enter. To enable tree like view in there you will need this to be added to your ~/.vimrc:

g:netrw_liststyle=3

I never tried the above solutions but benefit of this is that you can get it working in couple of minutes with out of the box vim.

Bonus Feature

If you open directory with vim just hit i to change the modes.

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