如何在Vim中向上滚动以查看系统命令的输出 [英] How to scroll up to view the output of system command in Vim

查看:98
本文介绍了如何在Vim中向上滚动以查看系统命令的输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的很喜欢在vim中运行一些系统命令

I really like run some system command in vim like

:!rspec

但是令人讨厌的是我无法向上滚动以查看输出信息

but the annoying thing is I can't scroll up to see the output information

我在Mac 10.9中使用Macvim,有人知道怎么做吗?

I'm using Macvim in Mac 10.9, anyone know how to do this?

推荐答案

据我所知,您无法在外部来源的输出中向上滚动.

As far as I know, you can't scroll up in output that comes from an external source.

消息确实具有简单的滚动功能,但仅用于Vim完全控制的消息.请参见 :h messages .

Messages do have a simple scrolling facility but only for the messages over which Vim has full control. See :h messages.

不过,看看您的屏幕截图,我可以告诉您您做错了.通过:!rspec运行RSpec效率低下. Vim在其运行时具有RSpec编译器.

Looking at your screenshot though, I can tell you that you're doing it wrong. Running RSpec through :!rspec is inefficient. Vim has an RSpec compiler in its runtime.

:compiler rspec
:make

现在已解析RSpec输出并将其填充到您的快速修复列表中,以便于导航.

Now RSpec output is parsed and filled into your quickfix list for easy navigation.

有关更多RSpec功能(例如异步测试运行)的信息,请查看 dispatch.vim .

For even more RSpec power such as asynchronous test runs check out dispatch.vim.

这篇关于如何在Vim中向上滚动以查看系统命令的输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆