离开插入模式的vim分割窗口 [英] leave vim split window in insert mode

查看:103
本文介绍了离开插入模式的vim分割窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Vim拆分窗口查看bash命令的输出:分裂。为此我安装Conque壳牌,这在显示庆典在分割窗口:ConqueTermSplit庆典。然后我可以运行我的shell命令,并观看插入模式的输出。但是,返回到另一个窗口,我需要类型< CTRL-W> <调试与GT;在命令模式,所以我需要离开插入模式。因此,命令的输出冻结的显示,只有继续,如果我回到这个窗口,并进入插入模式。所以,我怎么能离开Conque壳不留插入模式。

I want to view the output of a bash command in a vim split window :split. To this end I installed "Conque Shell" which displays bash in a split window upon :ConqueTermSplit bash. I can then run my shell command and watch the output in insert mode. However, to return to the other window I need to type <CTRL-W> <Up> in command mode, so I need to leave insert mode. Hence the display of the command output freezes and continues only if I return to this window and enter insert mode. So how can I leave "Conque Shell" without leaving insert mode.

请注意查看bash的输出在第二个窗口可能解决我的问题,以及那其他方式。但是当我在其他窗口我的工作就应该更新,并让我如信号&LT; CTRL-C&GT;到应用程序。

Note that other ways of viewing the bash output in a second window might solve my problem as well. However it should update while I am working in the other window and allow me to signal e.g. <CTRL-C> to the application.

该ConqueTerm文件说:

The ConqueTerm documentation says:

3.1.5不断更新终端缓存* ConqueTerm_ReadUnfocused *

3.1.5 Keep updating terminal buffer *ConqueTerm_ReadUnfocused*

如果设置为1,那么你的Conque缓冲区将继续更新你以后过
切换到另一个缓冲区。

If set to 1 then your Conque buffers will continue to update after you've switched to another buffer.

注意:Conque缓冲器可以继续更新,但因为它们不会向下滚动
新行被添加超过可见缓冲区域的底部。这是一个
Vim的脚本语言的限制,为此,我还没有找到一个
解决方法。
>
    让G:ConqueTerm_ReadUnfocused = 1

Note: Conque buffers may continue to update, but they will not scroll down as new lines are added beyond the bottom of the visible buffer area. This is a limitation of the Vim scripting language for which I haven't found a workaround. > let g:ConqueTerm_ReadUnfocused = 1

推荐答案

据我所知Vim有异步会话不支持,所以这更多的是您的要求为潜在的替代选项的响应。

AFAIK Vim has no support for asynchronous sessions, so this is more of a response to your request for potential alternative options.

这是我目前解决这个问题中得到的方法是使用 TMUX ,被描述为:

The way that I currently get around this issue is by using tmux, which is described as:

一个终端复用器:它使多个终端(或窗口)的,
  每个运行一个单独的程序,也可以创建,访问和
  从单屏进行控制。

a terminal multiplexer: it enables a number of terminals (or windows), each running a separate program, to be created, accessed, and controlled from a single screen.

所以,基本上,而不是在Vim中拆分屏幕,你会使用TMUX分裂,然后在一个窗口中运行的Vim和​​你想这将完全独立的Vim更新任何其他程序的其他运行。就这样的Vim可以用几个按键的(因为它们是在TMUX行话叫或窗格)的窗口之间切换。

So, basically, instead of splitting your screen in Vim you would split it using tmux, and then in one window run Vim and in the other run whatever other program you want which will update completely independently of Vim. And just like Vim you can switch between the windows (or panes as they are called in tmux lingo) using a couple of key strokes.

有一个名为 GNU屏幕使用另一个终端复用器,这也是相当流行。而我提到的原因是因为我喜欢有选择,也有两个插件的Vim,让您直接发送输出到一个附加屏幕或TMUX会话。对于GNU屏幕, slime.vim ,并TMUX , tslime.vim

There is another terminal multiplexer available called GNU screen, which is also quite popular. And the reason I mention that is because I like to have options, and also there are two plugins for Vim that allow you to send output directly to an attached screen or tmux session. For GNU screen, slime.vim, and for tmux, tslime.vim.

这篇关于离开插入模式的vim分割窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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