|
From: Soren A <sor...@fa...> - 2002-12-05 01:23:01
|
Earnie Boyd <ear...@ya...> wrote around 04 Dec 2002
news:3DE...@ya...:
> Soren A wrote:
>> Earnie, it sure seems like this rc is broken.
> Yes, and I'm in the process of creating rc-7.
>> I am trying to use what was working before, an invocation of my GVIM
>> editor (GVIM=VIM for Win32 Gui):
> I'm not sure what it is you're doing with
>> My shell function includes
>> local WAWA=$(pwd -W)
>> $GVIMexe $GVIMopt --remote-send "<Esc>:echo $WAWA
>> " ;
>>
>> and what gets sent to the application is a command to cd to:
>>
>> \MSYS\1.0\MSYS\1.0\home\sorenboss
>
> I'm not sure where this came from.
In explanation, I tried many things both before and after posting here.
There is a syntax for passing a command in the "Ex" language (Vi's macro
language I guess it is considered) to a running GVIM using a client-server
model. "--remote-send" is followed by something that you'd type at a
commandline in the GVIM editor (which has a command entry field ==
"commandline" along the bottom of the application window) to get it to do
something. In this case, what I want GVIM to do is to `cd' into the cwd of
the MSYS shell. The command you saw in the posting was pasted in when I was
in the middle of frustration and troubleshooting and I was trying ":echo"
(an Ex command) to get diagnostics. What the real command I wanted, was
like this:
${GVIM} --remote-send "<Esc>:lcd $WAWA"
Where 'lcd' means "local cd" and changes GVIM's notion of the current
directory *just for that buffer* (window). Many other commands are
available. The '<Esc>' notation is intended literally, it is understood by
GVIM when it receives the arguments and parses to a real "ESC" which places
the application in command-line mode.
At some later point I was not getting the doubled path anymore, but only
the single beheaded "\MSYS\1.0\home\sorenboss" with no drive spec. The
first part of the argument, the Ex command containing "<Esc>:lcd ", was
being swallowed completely before arrival at GVIM, apparently.
> Perhaps the full shell function would help with some explanation of
> use.
I will post it soon. It would probably be helpful to somebody. I use the
same function (with minor modifications to use $(cygpath -ma `pwd`) instead
of using $(pwd -W) for starting GVIM from Cygwin, and it is working fine.
>> ;-(. I wish that my slashes, carefully asked for by using `pwd -W`,
>> would not be messed with; and I wish that the leading directories not
>> be doubled.
>>
>> If I check the content of $WAWA before sending the command, it
>> contains correct data (i.e. `/bin/echo $WAWA` gives
>> "D:/msys/1.0/etc/.profile").
> I downloaded and installed GVIM and interprocess communication appears
> to be working, including the starting of the MSYS sh.exe by pressing
> the pretty shell icon.
You did all that just to help me out?
Thanks so much. That's terrific.
Maybe you'll fall in love with GVIM the way I have, too.
:-). I have never actually used the shell icon though :-).
--
Yes, it's really Sören, not Soren.
|