MacVim 中类似 Command - R 的功能

发布于 2024-09-25 20:33:03 字数 162 浏览 0 评论 0原文

我使用的是 Mac,当我在 TextMate 中编辑 ruby​​ 文件时,我只需按 Command-R 即可执行该文件并在新窗口中查看结果。使用 MacVim 有类似的东西吗?

能够打开一个新窗口非常重要。原因是因为在当前窗口中我可能有不止一整页的信息。如果发生这种情况,我将无法滚动浏览它。

I'm on a Mac and when I am in TextMate editing a ruby file I can simply hit Command-R to execute the file and see the results in a new window. Is there something similar to this using MacVim?

It's really important that I be able to open up a NEW window. Reason is because in the current window I might have more than one full page of info. If that happens I can't scroll through it.

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

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

发布评论

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

评论(2

黎夕旧梦 2024-10-02 20:33:03

您可以创建自己的映射来执行此操作:

map <D-r> :w<CR>:!ruby %<CR>

% 是当前文件。如果您的文件以 #!/path/to/ruby 开头,您可以在映射中省略对 ruby 的显式调用。

尚未测试 映射 - 这里没有 mac。这可能取决于配置。

You could create your own mapping to do it:

map <D-r> :w<CR>:!ruby %<CR>

% is the current file. If your file starts with #!/path/to/ruby you can omit the explicit call to ruby in your mapping.

Haven't tested the <D-r> mapping - no mac here. It's likely configuration dependent.

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