On Sunday, October 13, 2013 8:52:05 AM UTC-5, Andre Sihera wrote:
>     
>     
> 
>     I'll take your "Thus such command makes exactly no sense" response
>     as a "No", shall I?
> 
>     
> 
>     A plug-in developer may want to create an intrusive plug-in, in
>     which case there had
> 
>     better be a way that normal users have to protect themselves against
>     such plug-ins,
> 
>     irrespective of whether those plug-ins were created with malicious
>     intent or not.
> 

Protection: don't install a plugin that uses timers!

>     
> 
>     Timers turn a finite-state system into a real-time system, and
>     guaranteeing the reliability
> 
>     of any real-time system is impossible. Which is why, in every
>     real-time system, however
> 
>     simple, there is always a get-out clause; and ViM should have one as
>     well for when things
> 
>     go wrong. There is a lack of control on some commands now but that
>     is no excuse for not
> 
>     building in appropriate controls into future commands to create a
>     more robust, reliable,
> 
>     and predictable User experience.
> 

A "get out" command was something we discussed extensively. If I understand 
correctly, if Vim starts misbehaving due to timers, press CTRL-C and the 
currently executing timer, and all future timer events, will be cancelled.

This is just like what you would do if syntax highlighting rules or a / search 
or an infinite loop in plugin code were to make Vim unresponsive due to a user 
command.

>     
> 
>     When things inevitably do go wrong and become a hassle to diagnose
>     and/or fix, Users
> 
>     may dump ViM in favour of other editors; editors that don't pretend
>     to be all-singing and
> 
>     all-dancing for the benefit of a few at the expense of being a
>     robust, reliable, and
> 
>     predictable tool for the many.

Vim out-of-the-box has NO plugins which include a timer. If a user installs a 
bad plugin, then that is their fault. Nobody is going to dump Vim because they 
installed a bad plugin. They will dump the bad plugin.

Syntax highlighting can make Vim hang (until you press CTRL-C). Do you disable 
all syntax highlighting?

Any arbitrary plugin can set a CursorHold or CursorMoved autocmd that does:

   while 1
   endwhile

This will make Vim hang (until you press CTRL-C). Do you disable all autocmds?

Any plugin can set a user mapping like :nnoremap j :wqa!<CR>

Do you remove all mappings after loading your plugins?

Out-of-the-box Vim should never contain timers that will make Vim hang without 
the user doing something stupid. Installing a plugin is always a risk the user 
takes on. If the user installs a plugin and it doesn't work, they need to 
uninstall the plugin and notify the plugin author that their plugin is broken.

-- 
-- 
You received this message from the "vim_dev" 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_dev" 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.

Raspunde prin e-mail lui