vim + xterm + gnu/screen question

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

vim + xterm + gnu/screen question

Jorge Scandaliaris

Hi,
Sorry if the question seems obvious, but I noticed that my vim
sessions are terminated if for any reason X crashes, which defeats the
purpose of running them inside screen sessions. Is this normal,
expected behavior? Is there a way to have persistent vim sessions even
if X crashes?
Thanks


jorges
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: vim + xterm + gnu/screen question

Manu Hack
On Wed, Apr 30, 2008 at 12:35 PM, jorges <[hidden email]> wrote:

Hi,
Sorry if the question seems obvious, but I noticed that my vim
sessions are terminated if for any reason X crashes, which defeats the
purpose of running them inside screen sessions. Is this normal,
expected behavior? Is there a way to have persistent vim sessions even
if X crashes?
Thanks

My experience is that as long as you do not shut down your machine, you can always attach the previous screen session using screen -x even after you close the xterm and restart X.

manu

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: vim + xterm + gnu/screen question

Andy Kittner
In reply to this post by Jorge Scandaliaris
On Wed, Apr 30, 2008 at 09:35:52AM -0700, jorges wrote:
>
>Hi,
>Sorry if the question seems obvious, but I noticed that my vim
>sessions are terminated if for any reason X crashes, which defeats the
>purpose of running them inside screen sessions. Is this normal,
>expected behavior? Is there a way to have persistent vim sessions even
>if X crashes?
>Thanks

 From vim --help:

  -X                   Do not connect to X server

This should prevent vim from opening a connection to the X-server
(which is AFAIK only used for clipboard-interchange with other X-apps),
thus preventing it to exit if this connections suddenly dies under its
feet.

Andy

--
A black cat crossing your path signifies that the animal is going somewhere.
                -- Groucho Marx

attachment0 (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: vim + xterm + gnu/screen question

Matt Wozniski-2
In reply to this post by Jorge Scandaliaris

On Wed, Apr 30, 2008 at 12:35 PM, jorges wrote:
>
>  Hi,
>  Sorry if the question seems obvious, but I noticed that my vim
>  sessions are terminated if for any reason X crashes, which defeats the
>  purpose of running them inside screen sessions. Is this normal,
>  expected behavior? Is there a way to have persistent vim sessions even
>  if X crashes?
>  Thanks

Try updating to the latest vim.  There were some patches to this
behavior somewhere around 7.1.150 or 7.1.200 that allowed vim to
gracefully handle the X server dying.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: vim + xterm + gnu/screen question

Jorge Scandaliaris

I just realized I hit "reply to author" instead of reply. Posting
again...

On May 1, 3:14 am, "Matt Wozniski" <[hidden email]> wrote:

> On Wed, Apr 30, 2008 at 12:35 PM, jorges wrote:
>
> >  Hi,
> >  Sorry if the question seems obvious, but I noticed that my vim
> >  sessions are terminated if for any reason X crashes, which defeats the
> >  purpose of running them inside screen sessions. Is this normal,
> >  expected behavior? Is there a way to have persistent vim sessions even
> >  if X crashes?
> >  Thanks
>
> Try updating to the latest vim.  There were some patches to this
> behavior somewhere around 7.1.150 or 7.1.200 that allowed vim to
> gracefully handle the X server dying.

This is vim 7.1.266 so the patch should be included. I'll investigate
on this.

@Andy Kittner: Thanks for the tip. I'll keep it s a last resource, as
I sometimes make use of vim - X clipboard features.

@Manu Hack: I can indeed resume screen, no problem there, but all vim
sessions inside are dead, that's my problem.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: vim + xterm + gnu/screen question

Andreas Politz

jorges wrote:

>I just realized I hit "reply to author" instead of reply. Posting
>again...
>
>On May 1, 3:14 am, "Matt Wozniski" <[hidden email]> wrote:
>  
>
>>On Wed, Apr 30, 2008 at 12:35 PM, jorges wrote:
>>
>>    
>>
>>> Hi,
>>> Sorry if the question seems obvious, but I noticed that my vim
>>> sessions are terminated if for any reason X crashes, which defeats the
>>> purpose of running them inside screen sessions. Is this normal,
>>> expected behavior? Is there a way to have persistent vim sessions even
>>> if X crashes?
>>> Thanks
>>>      
>>>
>>Try updating to the latest vim.  There were some patches to this
>>behavior somewhere around 7.1.150 or 7.1.200 that allowed vim to
>>gracefully handle the X server dying.
>>    
>>
>
>This is vim 7.1.266 so the patch should be included. I'll investigate
>on this.
>
>@Andy Kittner: Thanks for the tip. I'll keep it s a last resource, as
>I sometimes make use of vim - X clipboard features.
>
>@Manu Hack: I can indeed resume screen, no problem there, but all vim
>sessions inside are dead, that's my problem.
>
>  
>
I think you are talking about 2 different things.
1. Let vim survive a X shutdown.
2. Let vim die gracefully, when X shuts down.

vim is more or less a child of X and will follow it's
destiny, while the screen session is mostly not.


-ap


--
:wq


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: vim + xterm + gnu/screen question

Tony Mechelynck

On 01/05/08 10:32, A.Politz wrote:
[...]
> I think you are talking about 2 different things.
> 1. Let vim survive a X shutdown.
> 2. Let vim die gracefully, when X shuts down.
[...]

Gvim will of course never survive an X server shutdown, but have you
tried compiling with Gnome2? (i.e., --enable-gui=gtk2
--enable-gnome-check). I have, and when closing down X from either the
Gnome or the KDE winmanager (I use KDE) gvim saves its session
transparently, and reloads it automagically at next X startup (see :help
gnome-session).

I know Bram has misgivings about the Gnome GUI but I've never
experienced any Gnome2-specific problems in gvim.

Best regards,
Tony.
--
BRIDGEKEEPER: What is the air-speed velocity of an unladen swallow?
ARTHUR:       What do you mean?  An African or European swallow?
BRIDGEKEEPER: Er ...  I don't know that ... Aaaaarrrrrrggghhh!
    BRIDGEKEEPER is cast into the gorge.
                  "Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: vim + xterm + gnu/screen question

Andreas Politz
In reply to this post by Andreas Politz

A.Politz wrote:

>jorges wrote:
>
>  
>
>>I just realized I hit "reply to author" instead of reply. Posting
>>again...
>>
>>On May 1, 3:14 am, "Matt Wozniski" <[hidden email]> wrote:
>>
>>
>>    
>>
>>>On Wed, Apr 30, 2008 at 12:35 PM, jorges wrote:
>>>
>>>  
>>>
>>>      
>>>
>>>>Hi,
>>>>Sorry if the question seems obvious, but I noticed that my vim
>>>>sessions are terminated if for any reason X crashes, which defeats the
>>>>purpose of running them inside screen sessions. Is this normal,
>>>>expected behavior? Is there a way to have persistent vim sessions even
>>>>if X crashes?
>>>>Thanks
>>>>    
>>>>
>>>>        
>>>>
>>>Try updating to the latest vim.  There were some patches to this
>>>behavior somewhere around 7.1.150 or 7.1.200 that allowed vim to
>>>gracefully handle the X server dying.
>>>  
>>>
>>>      
>>>
>>This is vim 7.1.266 so the patch should be included. I'll investigate
>>on this.
>>
>>@Andy Kittner: Thanks for the tip. I'll keep it s a last resource, as
>>I sometimes make use of vim - X clipboard features.
>>
>>@Manu Hack: I can indeed resume screen, no problem there, but all vim
>>sessions inside are dead, that's my problem.
>>
>>
>>
>>    
>>
>I think you are talking about 2 different things.
>1. Let vim survive a X shutdown.
>2. Let vim die gracefully, when X shuts down.
>
>vim is more or less a child of X and will follow it's
>destiny, while the screen session is mostly not.
>
>
>  
>
I guess I was wrong.

-ap


--
:wq


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: vim + xterm + gnu/screen question

Jorge Scandaliaris
In reply to this post by Tony Mechelynck

On May 1, 9:29 am, Tony Mechelynck <[hidden email]>
wrote:

> On 01/05/08 10:32, A.Politz wrote:
> [...]> I think you are talking about 2 different things.
> > 1. Let vim survive a X shutdown.
> > 2. Let vim die gracefully, when X shuts down.
>
> [...]
>
> Gvim will of course never survive an X server shutdown, but have you
> tried compiling with Gnome2? (i.e., --enable-gui=gtk2
> --enable-gnome-check). I have, and when closing down X from either the
> Gnome or the KDE winmanager (I use KDE) gvim saves its session
> transparently, and reloads it automagically at next X startup (see :help
> gnome-session).
>
> I know Bram has misgivings about the Gnome GUI but I've never
> experienced any Gnome2-specific problems in gvim.
>
> Best regards,
> Tony.
> --
> BRIDGEKEEPER: What is the air-speed velocity of an unladen swallow?
> ARTHUR:       What do you mean?  An African or European swallow?
> BRIDGEKEEPER: Er ...  I don't know that ... Aaaaarrrrrrggghhh!
>     BRIDGEKEEPER is cast into the gorge.
>                   "Monty Python and the Holy Grail" PYTHON (MONTY)
> PICTURES LTD

I actually use console vim inside an xterm terminal. That's why I
thought my sessions should survive. The weird thing is that following
advice from this thread I tried starting vim with -X option in an
xterm inside screen and, for comparison, another vim session started
normally. I logged out of my DE and re-attached the screen session in
the linux console. Surprise, both sessions were alive. Now I don't
understand anything, this happened not once, but many times in the
past. So, who knows what was the real cause of my sessions dying...

jorge
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Java omni complete not auto complete as expected

hack-3

Hi,
I have a following code: Authenticator.java

------------------
import javax.swing.*;
public class Authenticator extends javax.swing.JFrame {
        JTextField username=new JTextField(15);
        JPasswordField password=new JPasswordField(15);
        JTextArea comments=new JTextArea(4,15);
        JButton ok=new JButton("OK");
        JButton cancel=new JButton("Cancel");

}
---------------------
In general, java omni completion works for me in most cases.
However, in above code, Ex when I typed (without quote) "JText"
then pressed Ctrl-X Ctrl-U, java omni did nothing for me.
(In this case it should auto fill the rest: "Field" to become: "JTextField".
Any help please. Does java omni completion can do above?
Regards,


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: vim + xterm + gnu/screen question

sadarax
In reply to this post by Jorge Scandaliaris
I have been using Vim in Screen for years now. I never used the -X option, and here is what I found. For the screen session I started, If my x-session died, then my Vim would take about 2 minutes lag before it would start from within screen. Otherwise I have never had any problem with Vim inside of screen. If I started the screen session from outside of an X-session, then my vim was unaffected.

On Thu, May 1, 2008 at 7:15 AM, jorges <[hidden email]> wrote:

On May 1, 9:29 am, Tony Mechelynck <[hidden email]>
wrote:
> On 01/05/08 10:32, A.Politz wrote:
> [...]> I think you are talking about 2 different things.
> > 1. Let vim survive a X shutdown.
> > 2. Let vim die gracefully, when X shuts down.
>
> [...]
>
> Gvim will of course never survive an X server shutdown, but have you
> tried compiling with Gnome2? (i.e., --enable-gui=gtk2
> --enable-gnome-check). I have, and when closing down X from either the
> Gnome or the KDE winmanager (I use KDE) gvim saves its session
> transparently, and reloads it automagically at next X startup (see :help
> gnome-session).
>
> I know Bram has misgivings about the Gnome GUI but I've never
> experienced any Gnome2-specific problems in gvim.
>
> Best regards,
> Tony.
> --
> BRIDGEKEEPER: What is the air-speed velocity of an unladen swallow?
> ARTHUR:       What do you mean?  An African or European swallow?
> BRIDGEKEEPER: Er ...  I don't know that ... Aaaaarrrrrrggghhh!
>     BRIDGEKEEPER is cast into the gorge.
>                   "Monty Python and the Holy Grail" PYTHON (MONTY)
> PICTURES LTD

I actually use console vim inside an xterm terminal. That's why I
thought my sessions should survive. The weird thing is that following
advice from this thread I tried starting vim with -X option in an
xterm inside screen and, for comparison, another vim session started
normally. I logged out of my DE and re-attached the screen session in
the linux console. Surprise, both sessions were alive. Now I don't
understand anything, this happened not once, but many times in the
past. So, who knows what was the real cause of my sessions dying...

jorge




--
How sad it would be to live a life less wonderful, if only because one were afraid of a little hard work. If you shy away from challenges, you shy away from some of the greatest achievements in life.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: vim + xterm + gnu/screen question

Manu Hack
In reply to this post by Jorge Scandaliaris


On Thu, May 1, 2008 at 12:57 AM, jorges <[hidden email]> wrote:

I just realized I hit "reply to author" instead of reply. Posting
again...

On May 1, 3:14 am, "Matt Wozniski" <[hidden email]> wrote:
> On Wed, Apr 30, 2008 at 12:35 PM, jorges wrote:
>
> >  Hi,
> >  Sorry if the question seems obvious, but I noticed that my vim
> >  sessions are terminated if for any reason X crashes, which defeats the
> >  purpose of running them inside screen sessions. Is this normal,
> >  expected behavior? Is there a way to have persistent vim sessions even
> >  if X crashes?
> >  Thanks
>
> Try updating to the latest vim.  There were some patches to this
> behavior somewhere around 7.1.150 or 7.1.200 that allowed vim to
> gracefully handle the X server dying.

This is vim 7.1.266 so the patch should be included. I'll investigate
on this.

@Andy Kittner: Thanks for the tip. I'll keep it s a last resource, as
I sometimes make use of vim - X clipboard features.

@Manu Hack: I can indeed resume screen, no problem there, but all vim
sessions inside are dead, that's my problem.


For me, after re-attaching to a screen session, the vim would still be there but somehow many plugins would fail to work. 

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---