On Thursday, October 17, 2013 5:14:36 AM UTC-5, Yggdroot Chen wrote:
> I encounter a critical issue when writing vim script using python, for 
> example the code is as below:
> 
> 
> 
> def func():
> 
>     try:    
> 
>         while 1:
> 
>             xxx
> 
>             xxx
> 
>     except KeyboardInterrupt:
> 
>         pass
> 
> 
> 
>     vim.command("xxxx")
> 
> 
> 
> I press ctrl-c to interrupt the program, after KeyboardInterrupt is raised, 
> vim.command() always throw an exception,which is KeyboardInterrupt in vim7.3 
> and vim.error in vim7.4.
> 
> 
> 
> I want to use "signal.signal(signal.SIGINT, signal.SIG_IGN)" to ignore 
> SIGINT,but it doesn't work.
> 
> 
> 
> Any one knows this issue?

The issue is you're trying to prevent the user from rescuing their Vim from a 
misbehaving command. You are trying to potentially cause data loss when they 
need to force-kill their Vim instead of just stopping a single bad command.

Don't do that.

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to