Saturday, August 22, 2020

Autocommand script

Hi all,

I was wondering (a) if there is a better way to do it than this
script, and (b) whether all the backslashes and pipe characters (|)
are really necessary and why.

if has("autocmd")
au BufLeave * let x=0 | while x<=bufnr('$') |
\ if bufexists(x) |
\ set buflisted hidden bufhidden=hide |
\ endif |
\ let x = x+1 |
\ endwhile
endif " has("autocmd")

Regards,
Albert.

--
--
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 vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CALPW7mT1Tzv7P5z7w93%2B7cYm7EsMPVDrPq28HAC2YYDYGxaXTg%40mail.gmail.com.

No comments: