On Fri, May 06, 2005 at 06:51:41PM +0930, David Purton wrote:
[...]

| When I run vim, with out the X server running, it still tries to connect
| to the forwarded X server because $DISPLAY is set.

Yep.

| Of couse it fails,
| but it is not falling back to the terminal version, it just dies.

Odd.

| The version in sid definitely does not have this problem.

I've never seen that problem, personally.  (at least not that I can
remember)

| Perhaps my only option will be to alias vim to "vim -X". Or wait in
| anticipation for sarge to finish freezing and upgrade :)
| 
| Any other suggestions?

Frequently enough I ssh to a machine over a slow link.  Under those
circumstances, running 'vim' is fine except for the agonizing delay
while vim connects to the X server to interact with the clipboard.
Most of the time I don't need that feature, at least with the remote
system.  (however it can be very handy sometimes)

In my .vimrc I have the following:

    """"
    " Disable use of the X display for console vim.  This make copy-n-paste less
    " convenient, but it speeds up startup when remote.
    if ! has( "gui_running" )
        let g:display_num =
                \   substitute( $DISPLAY , 
                    \ '^[[:alpha:]]*:\([[:digit:]]\+\)\.[[:digit:]]\+$' , '\1' 
,"")
        if ( g:display_num >= 10 )
            set clipboard=exclude:.*
        endif
    endif

Basically it assumes that ssh-forwarded X displays start at number 10,
so if the display is ssh-forwarded, don't use it but if the display is
local (ie :0 or :1) it will use the X clipboard.

HTH,
-D

-- 
Windows, hmmm, does it come with a GUI interface that works or just
pretty blue screens?
 
www: http://dman13.dyndns.org/~dman/            jabber: [EMAIL PROTECTED]

Attachment: signature.asc
Description: Digital signature

Reply via email to