MacVim 中类似 Command - R 的功能
我使用的是 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以创建自己的映射来执行此操作:
%
是当前文件。如果您的文件以#!/path/to/ruby
开头,您可以在映射中省略对ruby
的显式调用。尚未测试
映射 - 这里没有 mac。这可能取决于配置。You could create your own mapping to do it:
%
is the current file. If your file starts with#!/path/to/ruby
you can omit the explicit call toruby
in your mapping.Haven't tested the
<D-r>
mapping - no mac here. It's likely configuration dependent.以下问题正是我正在寻找的答案
https://superuser.com/questions/133886/vim-displaying-code-output-in-a-new-window-a-la-textmate
The following question has the answer to exactly what I was looking for
https://superuser.com/questions/133886/vim-displaying-code-output-in-a-new-window-a-la-textmate