On 13Mar2007 23:29, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
| How can a Vim script know if we're running without an X connection?
| Of course, some cases are obvious, such as
|       if has('unix') && !has('x11')
| meaning we're on Unix with no X11 support compiled-in.
| 
| But what about an X-enabled Vim running in console mode, either with the -X 
| command-line switch, or in a terminal with no access to an X server?

Examine the $DISPLAY environment variable. If non-empty, you have a X11
display.
-- 
Cameron Simpson <[EMAIL PROTECTED]> DoD#743
http://www.cskk.ezoshosting.com/cs/

...when my mood gets too hot and I find myself wandering beyond control I pull
out my motor-bike and hurl it at top speed through these unfit roads for hour
after hour. My nerves are jaded and gone near dead, so that nothing less than
hours of voluntary danger will prick them into life... - T.E. Lawrence 1923

Reply via email to