Terminal into vim, best options???

已查看 2,930 次
跳至第一个未读帖子

Pablo Giménez

未读,
2010年5月24日 09:29:302010/5/24
收件人 vim_use
Hi.
I have been looking aroundto see what are the best options to have e fully usable terminal in VIM.
Basically a buffer which opens a terminal.
I have seen a coupleof options:
VimSh: http://www.vim.org/scripts/script.php?script_id=165
Problem here is that it needs a python ready vim, which is not so common in all systems.
Screen: http://www.vim.org/scripts/script.php?script_id=2711
This one looks good, and screen is a common in any UNIX system.

Any more options, anyone can put her/his experience using any of these plugins?

Finally to have a complitely multiplatform solution, wouldbe  great to have a solution for windows.
I haven't been able to find a plugin that opens a command (cmd.exe) session inside vim.

Thanks.

--
Un saludo
Best Regards
Pablo Giménez

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Tony Mechelynck

未读,
2010年5月24日 10:06:262010/5/24
收件人 vim...@googlegroups.com、Pablo Giménez
Why don't you simply open a terminal beside Vim? Vim is not a shell, and
though there are some third-party attempts to make it behave as one,
Bram has several times showed that he was staunchly opposed against that
kind of capabilities becoming part of mainline Vim.

The :! and :shell commands in gvim for Windows open a cmd.exe window
beside Vim; in Unix gvim they make the Vim command-line into a "dumb"
terminal which, like the teletypewriters used as consoles in the first
Unix machines, can move the "paper" forward by one line at a time and
never backward. I think the "best" option about a "fully usable"
terminal in gvim is: don't. But then Vim is open source, you can always
change it in any way you want, even beyond recognition and even if it
requires huge changes to the C code.

Maybe the best option is to use _console_ Vim, which, at least on Linux
(I'm not sure anymore about Windows) will hide itself when you use :! or
:shell, and display the "fully usable" terminal from which it was
started. Not in a buffer of course -- I guess you'd need Emacs to run an
interactive shell in an editor split-window.


Best regards,
Tony.
--
The Arkansas legislature passed a law that states that the Arkansas
River can rise no higher than to the Main Street bridge in Little
Rock.

Tim Chase

未读,
2010年5月24日 10:51:012010/5/24
收件人 vim...@googlegroups.com、Pablo Giménez
On 05/24/2010 08:29 AM, Pablo Giménez wrote:
> I have been looking aroundto see what are the best options to
> have e fully usable terminal in VIM.
...
> Screen: http://www.vim.org/scripts/script.php?script_id=2711
> This one looks good, and screen is a common in any UNIX
> system.

I either use "screen" if I'm ssh'ing in, using a serial console,
or at an X-less machine; or if I'm in X, I usually just have
multiple xterms/rxvts open.

> Finally to have a complitely multiplatform solution, wouldbe
> great to have a solution for windows. I haven't been able to
> find a plugin that opens a command (cmd.exe) session inside
> vim.

With Win32, I usually just have additional cmd.exe windows open,
in which I do my svn/hg work, building, and testing.

-tim

thu...@gmail.com

未读,
2010年5月24日 15:05:302010/5/24
收件人 vim...@googlegroups.com
This might be of interest: http://conque.googlecode.com

Nico

未读,
2010年5月25日 00:40:152010/5/25
收件人 vim_use
There are quite a few options out there, all with their strengths and
weaknesses. Shell integration is at the top of the Vim wish list. I'm
sure Bram would be more interested in including it if someone
developed and maintained a kick-ass patch :-)

Here is a (quite biased) overview of what's currently available:

-------------------------------------------

Conque Shell
URL: http://code.google.com/p/conque/
Author: Nico Raffo (me!)
Requirements: *nix, python-enabled vim
Type: Plugin

Conque is a Vim plugin, written with Vim script and python. It turns
your Vim buffer into a terminal emulator. In INSERT mode your buffer
behaves like a standard unix terminal. In NORMAL mode you can navigate/
search/page through the terminal output.

Pros:
* Relatively easy to install
* Near complete VT100 support (you can run emacs in a vim buffer)
* Use of Vim features in terminal, including syntax highlighting,
copy/paste, etc
* Active development

Cons:
* No Windows support (coming with Vim 7.3)
* Can be slow, especially with programs which use a lot of terminal
colors

-------------------------------------------

Vimshell
URL: http://github.com/Shougo/vimshell + http://github.com/Shougo/vimproc
Author: Shougo M
Requirements: Works on both *nix and Windows. One small, independent
component may need to be compiled from C source.
Type: Plugin

Vimshell is a shell, written in the Vim scripting language, that runs
in a Vim buffer. The shell was written to take full advantage of all
of Vim's features, for example you can use Vim's omnicomplete
features, or any other normal mode Vim commands, to edit your command
line. Great potential, but missing a few features, particularly
regarding interactive programs.

Pros:
* Relatively easy to install
* Edit the command line with Vim, full use of Vim features in both
normal and insert mode
* Very fast, since there is no background process required
* Windows support
* Active development

Cons:
* Very limited support of interactive programs such as bash, mysql or
python.
* Shell has incomplete functionality compared to bash, etc.
* Documentation only available in Japanese.

-------------------------------------------

screen.vim (Vim + screen/tmux)
URL: http://www.vim.org/scripts/script.php?script_id=2711
Author: Eric Van Dewoestine
Requirements: *nix
Type: Plugin

screen.vim is a Vim plugin which streamlines and enhances the
experience of running split screen terminal with Vim running in one of
the windows and a terminal running in the other. It uses the programs
screen or tmux to manage the split windows and to run the terminal
emulation. Both of these programs are very mature, and will give a
better terminal experience than any other option. However since the
terminal is running independently of Vim, you won't be able to use Vim
commands to interact with the terminal output.

Pros:
* Easy to install
* Great shell support
* Active development

Cons:
* No use of Vim commands to manage the shell window
* Relatively little integration between Vim and the shell

-------------------------------------------

Vim-Shell
URL: http://www.wana.at/vimshell/
Author: Thomas Wanda
Requirements: *nix, patch and recompile Vim from source
Type: Extension

Vim-Shell is a Vim extension which converts a buffer into a terminal
emulator. The shell window itself is very fast and functionality is
very strong. It is works great for running complex interactive
programs. However the Vim buffer where it runs is no longer editable
(you can't scroll up, or even move the cursor). The last official
release was for Vim 7.0, although time spent searching on Google will
turn up patches for Vim 7.1 and 7.2.

Pros:
* Near complete VT100 support (you can run emacs in a vim buffer, and
just about anything else)
* Very fast. Compiled into the C source

Cons:
* Relatively difficult to install
* No use of Vim features to navigate terminal output
* No Windows or Mac support.
* No development activity since 2006

-------------------------------------------

Vimsh
URL: http://www.vim.org/scripts/script.php?script_id=165
Author: Brian Sturk
Requirements: python-enabled vim
Type: Plugin

Vimsh is a Vim plugin which allows you to run interactive programs in
a vim buffer. It provides a nice option for Windows use, but
functionality is overall less mature than the other options.

Pros:
* Relatively easy to install
* Use Vim commands to edit commands and navigate terminal output
* Support in both *nix and Windows (no interactive programs in
Windows)

Cons:
* Limited functionality
* Inactive development

-------------------------------------------

:!

Just use :!emacs -nw and call it good.

Christian Brabandt

未读,
2010年5月25日 04:48:122010/5/25
收件人 vim...@googlegroups.com
On Tue, May 25, 2010 6:40 am, Nico wrote:
> There are quite a few options out there, all with their strengths and
> weaknesses. Shell integration is at the top of the Vim wish list. I'm
> sure Bram would be more interested in including it if someone
> developed and maintained a kick-ass patch :-)
>
> Here is a (quite biased) overview of what's currently available:

[...]
That was really interesting. This should be in the wiki.
Could you put it there?

regards,
Christian

Pablo Giménez

未读,
2010年5月25日 11:40:272010/5/25
收件人 vim...@googlegroups.com
Thanks a lot for your answers, and specially Nico for taking the time to compile all of these examples.
I think that I will try conque and screen.vim, and see what better suits my needs.
The possibility of using vim commands in conque in normal mode is really appetizing.
thanks!

2010/5/25 Nico <nico...@gmail.com>

--
Un saludo
Best Regards
Pablo Giménez

回复全部
回复作者
转发
0 个新帖子