当我通过vim输入Shell命令,例如:!rake routes
时,我会得到一些输出,然后:
Press ENTER or type command to continue
如果我此时按任何键,我总是会回到主vim界面。我怎样才能停留在shell模式更长一点时间呢?具体来说,我想要向上滚动以查看命令的所有输出。
当我通过vim输入Shell命令,例如:!rake routes
时,我会得到一些输出,然后:
Press ENTER or type command to continue
:r! [shell command]
命令将从命令中读取输出到缓冲区。因此,如果您打开一个新的缓冲区,然后使用该命令,您可以随意搜索和滚动查看所有内容。有关更多信息,请参见 Vimcasts episode 57。
:!rake routes \| more
?那可能会起作用。 - Rivasa