Comment #1 on issue 345 by [email protected]: NoMatchParen might cause
E201: *ReadPre autocommands must not change current buffer
https://code.google.com/p/vim/issues/detail?id=345
I fully agree that such :windo extension as provided by your s:Windo()
function is necessary for most plugin uses. My ArgsAndMore plugin
(http://www.vim.org/scripts/script.php?script_id=4152) provides such
extended :Windo command (and :Bufdo, :Argdo, :Tabdo, etc.) also for
interactive use.
Besides saving and restoring the original and previous windows, the window
layout may also be affected by :windo; namely, windows with a height /
width of 0 (frequently used in "Rolodex mode") will increase to size 1 by
entering. This can be undone by wrapping the :windo with this:
let l:originalWindowLayout = winrestcmd()
windo ...
silent! execute l:originalWindowLayout
Full implementation:
+function! s:Windo(command)
+ let l:originalWindowLayout = winrestcmd()
+ let curaltwin = winnr('#') ? winnr('#') : 1
+ let currwin = winnr()
+ execute 'windo ' . a:command
+ execute curaltwin . 'wincmd w'
+ execute currwin . 'wincmd w'
+ silent! execute l:originalWindowLayout
+endfunction
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
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/d/optout.