Am 08.05.2017 um 13:04 schrieb Christian Brabandt:

On Mo, 08 Mai 2017, Bram Moolenaar wrote:


Besides that, plugin writers also have a problem with very common
options, such as 'wrapscan' and 'ignorecase'.  We are nog going to
remove these.  Having an easy way to set these to their default, and
restore them later (without side effects), would be very useful.

For flexibility this needs to work recursively.  We could do something
like:

        let saved_options = options_save()
        ... do your stuff ...
        call options_restore(saved_options)

The options being saved should be small to keep this efficient.  We need
to make a list of the ones that are useful, such as 'ignorecase' and
'gdefault'.

Would those then also be set to a default by options_save? Or does every
plugin write have to set them as well?

Also worth containing: 'magic', 'cpo' and 'cp' options.

Setting 'cp' is too invasive.
Anyway, most plugins finish early if 'cp' is set.

--
Andy

--
--
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to