Monday, March 5, 2012

Re: shell for vim

On 2012-03-05, Eduardo Costa wrote:
> The :shell command does not work very well. It keeps inserting control
> chars into the output.

Vim's :shell command works just fine. If you are having trouble
with it, perhaps Vim, your shell or your terminal is misconfigured.

> I tried ConqueTerm bash. It is an improvement over the default :shell,
> but it is not very robust.

The :shell command executes the command given by the 'shell' option.
The value of 'shell' comes from the SHELL environment variable. If
SHELL is not set, Vim uses sh. See

:help 'shell'

To see which shell Vim is using and why, execute

:set shell?
:echo $SHELL

If SHELL is not set to your preferred shell, you can set it in your
shell's rc file or in ~/.profile. Be sure to export it as well.

> I cannot see why is so difficult to implement a shell escape for vim.
> I would appreciate if vim had a robust shell, like the one in Emacs.
> Maybe it has, but I don't know how to use it. For instance, is there a
> way to remove the control chars from the :shell output?

Vim's shell escape works very well (except under Windows). If you
are having problems with it, please provide the operating system you
are using, the version of Vim you are using (e.g., the first four
lines of the output of ":version"), the value of the 'shell' option,
and explain exactly the steps you take when you observe the problem.
Provide enough detail so that someone else should be able to
reproduce the problem. Also describe the results you expect and the
results you get instead. The more clear and accurate you are, the
more easily someone here will be able to identify the problem and
suggest a fix.

Regards,
Gary

--
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

No comments:

Post a Comment