On 2/16/07, Cameron Simpson <[EMAIL PROTECTED]> wrote:
On 15Feb2007 15:30, James Kanze <[EMAIL PROTECTED]> wrote:
| On 2/15/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote:
| >I'm using "It's All Text!" now.  Just had to create a shell script to
| >start gvim, because it doesn't allow you to give arguments to the
| >command.  I'm using this (on Unix, obviously):

| >        #!/bin/sh
| >        gvim -f "$@"

| I can't seem to get it to work; gvim comes up all right, but as
| if it was started without any file arguments.  Adding an echo to
| the shell script shows that in fact, it isn't being passed any
| arguments.  Is there something special I have to do in the
| preferences of "It's All Text!" to tell it how to pass a
| filename.

Um, no? It should just work. IAT only lets you supply the path to the
edit command, so it must pass the file as an argument - it seems to for
my setup.

That's what I would have thought.

You're certain the script gets not arguments - you're echoing
$# and $* ?

My script, exactly:

   #! /bin/sh

   export DISPLAY=padev054:0.1
   echo "Options:" "$@" > $HOME/tmp/firefoxVim.log
   $HOME/gnu/i686/bin/gvim -f "$@"

Having pressed the edit button, the vim window is open:

   $ cat ~/tmp/firefoxVim.log
   Options:
   $ ps -ef | egrep -i vim
   jakan    20652 17342  0 09:57 pts/4    00:00:00 /bin/sh
/home/team02/jakan/bin/firefoxVim
   jakan    20655 20652  0 09:57 pts/4    00:00:00
/home/team02/jakan/gnu/i686/bin/gvim -f

(My script is in $HOME/bin/firefoxVim.)

FWIW: firefox is running on a Linux 2.6.9 kernel (Redhat, I
think) on an Intel based PC.  The X Server (machine padev054) is
a Sun Sparc under Solaris 2.8, and I've got synergy managing the
keyboard and the mouse (server on the Sparc).  Off hand, I don't
see how any of that could make a difference (except maybe the
machine on which firefox is running).  Firefox is version
2.0.0.1 (en-US version), and It's All Text! is version 0.3.3.

I have no idea where to start looking beyond that.  For the
moment, I'm still copy/pasting, as I did before.

| >Store this in a file, make it executable, and set it from
| >Tools/Add-ons/It's All Text/Preferences

| >The plugin can be found here:
| >        https://addons.mozilla.org/firefox/4125/

| >Warning: If you set the preferences to use Vim firefox gets stuck.

| Not if you've started it from an xterm; vim comes up in the
| xterm.  (But Firefox does hang until you exit vim.)

That's surprising.

After a few more trials: it doesn't completely hang, but some
things don't work.  In particular, If you try to close the
window, it doesn't close.

--
James Kanze (GABI Software)             email:[EMAIL PROTECTED]
Conseils en informatique orientée objet/
                  Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Reply via email to