On Mon, Jul 17, 2000 at 09:30:10AM -0400, Bennett Todd wrote:
> 2000-07-17-09:26:17 Mostly Harmless:
> > Is there an easy way to specify my editor as gvim if I'm in x, and vim
> > if I'm connected from a remote machine via ssh?
> 
> Ayup. Use a wrapper script. Set the EDITOR environment variable, or
> mutt's editor config variable, to the name of a wrapper script, and
> let logic in that wrapper script decide. E.g.
> 
>       #!/bin/sh
>       test -n "SSH_TTY"  && exec  vim ${1+"$@"}
>       test -n "$DISPLAY" && exec gvim ${1+"$@"}
>       exec vim ${1+"$@"}
> 
> -Bennett


Since we're OT I'll continue... :^)

Or, you could go to ftp.cs.pdx.edu:/pub/elvis and get the elvis source,
and build it. Elvis notices on its own whether you are in a GUI or not
and runs itself in the appropriate mode. Excellent vi clone.


-- 
---- Fred Smith -- [EMAIL PROTECTED] ----------------------------
               But God demonstrates his own love for us in this: 
                         While we were still sinners, 
                              Christ died for us.
------------------------------- Romans 5:8 (niv) ------------------------------

Reply via email to