ZyX wrote: > There is one thing to note: unlike `:setlocal` / `:set` / `:setglobal` > you always know what option you are setting exactly. Unlike > `:setlocal` you cannot set global-only option by assigning to > `vim.window.options['paste']`. Unlike `:set` you can’t unset local > value and set global one in one shot. Unlike `:setglobal` you will see > error in place of silently ignoring local-only option set. > Distinguishing between buffer-local and window-local is also unique, > this prevents python plugin writers from confusion about what they are > really doing (setting window-local option on FileType event is too > common error; this variant does not prevent this, but does not let you > forget about the scope of the option). This way I am trying to follow > good python principle: explicit is better then implicit. This > interface is also slightly faster then running `vim.function` object > calling `getbufvar` or `getwinvar` or using `vim.eval`.
I have not included this patch yet, mainly because the documentation is missing. For switch_win() and restore_win(): These have side effects, they execute autocommands. The docs should mention that, see settabwinvar() for an example. Also, failures should be handled, currently it will silently work on the current window. Autocommands can be very nasty! -- If evolution theories are correct, humans will soon grow a third hand for operating the mouse. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- 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.
