On 2006-07-27, Luc Hermitte <[EMAIL PROTECTED]> wrote:
> More over I don't have any c:/ drive, and the shell can be anything.
I'm having a little trouble understanding how the shell can be
anything. What I think you're saying, and what I've understood from
reading your web pages, is that you launch Cygwin programs from
within vim using a set of macros, and that if you execute ":sh" or
":!" you will be using Windows' cmd.exe. Is that true?
What I've been trying to achieve is a vim configuration that looks
and feels the same under Cygwin as it does under Linux or Solaris;
so for example, executing ":sh" gives me a Cygwin bash shell and
executing ":r !ls" inserts the contents of the current directory
into the current buffer.
> BTW, we can also detect cygwin presence with "executable('cygpath')" ;
> as long as cygwin paths are in the $PATH, because the windows box is set
> to have cygwin in the $PATH, or because vim is launched from cygwin.
I was trying to allow vim to distinguish between being started from
a bash shell or from the Command Prompt. The
"executable('cygpath')" test will give the wrong answer if
C:\cygwin\bin is in the Windows PATH.
> The problem is deeper than just having the right vim executable. There
> are many different vim executables running on various system. As plugin
> writers, we have to make our plugins portable. Discarding one vim binary
> because there is another (patched) one that is compatible with the
> plugin is not the solution.
>
>
> Note: in case you are interrested, you will found on my web site:
> - a shell script that lauches win32-vim from cygwin and that translates
> pathnames (and only pathnames) -> cyg-wrapper.sh
> - a plugin that provides a few functions to detect the current system
> - .vimrc specific settings according to the current box vim is running
> on
> - a few plugins that call external programs (lh-vim-spell, triggers)
> - a compiler plugin-filter for cygwin that translates ":make" outputs
> from posix pathnames to windows pathnames. (-> experimental plugin
> BuildToolWrapper (lh-BTW.tar.gz in vim/ressources/)
This is great! Thank you for the pointers. I'm still reading and
digesting this and the results of a few related Google searches. I
think I will be using your cyg-wrapper.sh script and your aliases
for vim, gvim and explorer.
I just installed rxvt using Cygwin setup.exe and it seems to work
fine except when I execute vim: then my CPU usage goes to 50% and I
can see vim.exe in the Task Manager process list, but vim never
appears in the rxvt window. I finally just kill vim with ^C in the
rxvt window. I can execute vim from the Command Prompt and from the
Cygwin prompt, and I can execute gvim from all three. I have been
executing vim as "vim -u NONE" so the problem shouldn't be any of my
vim files. Using -V20 didn't show anything, either. Any idea why I
can't run vim from rxvt?
Regards,
Gary
--
Gary Johnson | Agilent Technologies
[EMAIL PROTECTED] | Wireless Division
| Spokane, Washington, USA