Conque: 在 Vim 中运行 Shell

熟悉 GNU Emacs 的朋友想必都知道在其中可以使用内嵌的 Shell,这是非常方便的。虽然我们不能在 Vim 中直接使用 Shell,但是利用 Conque 这款 Vim 插件可以达到同样的目的。事实上,Conque 不仅允许我们在 Vim 的编辑缓冲区运行诸如 Bash 此类的 Shell,而且对于其它的命令行程序同样适用,如 mysql、ipython 等。

conque

如果你下载的是 Conque 的 vimball 包,那么只需执行以下命令即可完成安装:

vim conque_X.X.vba
:so %
:q

其中,X.X 为 Conque 的版本号。

要在 Vim 的编辑缓冲区运行 Bash,则可以执行:

:ConqueTerm bash

Read More:

  • » No related posts

25 Comments

  1. 1 freetstar Commented @ 2010-06-23 17:50Reply to this comment

    不错的东东

  2. 2 evan Commented @ 2010-06-23 18:00Reply to this comment

    还是喜欢 urxvt + screen + vim

  3. 3 ee.zsy Commented @ 2010-06-23 18:28Reply to this comment

    在Emacs里用shell真的感觉非常好……

  4. 4 falcon Commented @ 2010-06-23 19:03Reply to this comment

    在vim里头执行shell还可以:

    :!shell command

  5. 5 逸川 Commented @ 2010-06-23 20:11Reply to this comment

    额。。。刚遇到关于vba的问题,还想讨教一下。。。 我打开一个vba格式的文件后想:so% 报错说UseVimball不是编辑器的命令。。。 搜索引擎了一下也不知道该怎么做。。。 麻烦了哈。。。

  6. 6 Nino Commented @ 2010-06-23 20:58Reply to this comment

    如果多个命令, Ctrl+z, bla bla bla, fg

  7. 7 Nino Commented @ 2010-06-23 21:00Reply to this comment

    @falcon: 还有BH的"!!"

  8. 8 Nino Commented @ 2010-06-23 22:48Reply to this comment

    @ee.zsy: 印象中那是个假shell,有很多问题的

  9. 9 Nino Commented @ 2010-06-23 22:48Reply to this comment

    @ee.zsy: 印象中那是个假shell,有很多问题的

  10. 10 Nino Commented @ 2010-06-23 22:50Reply to this comment

    @falcon: 还有BH的"!!",也就是":.!" 多个命令的时候,还是Ctrl-z + fg舒服些

  11. 11 ee.zsy Commented @ 2010-06-23 23:07Reply to this comment

    @Nino:确实有点不同。

    Emacs里的Shell只能用来显示和输入文本命令,而这个Conque貌似还可以运行像aptitude那样的终端下GUI程序。

  12. 12 ripley Commented @ 2010-06-23 23:36Reply to this comment

    运行:ConqueTerm bash时提示出错 Conque requires the Python interface to be installed. python interface是什么? python我已经装过了.

  13. 13 黑传说 Commented @ 2010-06-24 0:29Reply to this comment

    @Nino: emacs 下有几个的,有假的,也有真的(当然,也仅仅是皮肤),我就用过其中一个pacman -Syu了,呵呵。

  14. 14 linyunxian Commented @ 2010-06-24 9:14Reply to this comment

    习惯使用 set -o vi 直接在终端下使用vi 模式。

  15. 15 vimer Commented @ 2010-06-24 9:43Reply to this comment

    @逸川: 估计你vim版本太低了,先去下一个vimball插件装上先

  16. 16 falcon Commented @ 2010-06-24 10:40Reply to this comment

    Ctrl-z + fg 不错 ;)

  17. 17 falcon Commented @ 2010-06-24 10:42Reply to this comment

    刚用了一下 "!!",真地很爽,我之前一直用 ":r!" 效果是类似的

  18. 18 vern Commented @ 2010-06-24 15:53Reply to this comment

    @Nino: 可能在 windows 下这个插件才更显得有价值

  19. 19 逸川 Commented @ 2010-06-24 16:20Reply to this comment

    @vimer vim是Ubuntu源里的,最新的。Vimball也是,在vim.org下载的。。。 不过是复制到~/.vim目录下了。。。难道是这个问题?

  20. 20 Rothsdad Commented @ 2010-06-24 22:57Reply to this comment

    感觉不错,但还是emacs更随和,更舒服些。

  21. 21 MaskRay Commented @ 2010-06-25 7:23Reply to this comment

    zsh bash 的光标一直闪,普通模式、插入模式光标不区分 不知道有什么办法

  22. 22 逸川 Commented @ 2010-06-25 13:34Reply to this comment

    @逸川: 额。。。。应该说是~/.vim/plugin目录下

  23. 23 聚焦深空 Commented @ 2010-07-01 22:55Reply to this comment

    不错。 配合 fbterm vimim 挺爽。 运行下 tty,可验证新开 shell 使用独立 /dev/pts/*。

    之前,有 vim-shell 补丁 http://www.wana.at/vimshell/ 可完成类似功能,安全性相对要差些。

  24. 24 Cyril Liu Commented @ 2010-07-15 19:19Reply to this comment

    不行, 在macvim下报了一堆错。

  25. 25 wangtwo Commented @ 2010-08-06 0:32Reply to this comment

    试一下这个

    :help design-not

    在讨论vim配合gdb时有人这样建议 http://groups.google.com/group/vimuse/browsethread/thread/adbd5a96d7322a6f/5c52f2c854ed85cf?lnk=gst&q=emacs#5c52f2c854ed85cf