On Tue, Mar 20, 2018 at 1:48 PM, BPJ <b...@melroch.se> wrote:

> As the subject says: when I do `:bufdo e` in gvim syntax highlighting is
> turned off in the reloaded buffers.  Why? and more importantly: what can I
> do so that syntax is left on/turned on in all reloaded buffers?  The only
> fix I know of ATM is to do `:e` for each individual buffer, but the idea is
> of course to not have to do that!
>
> /bpj


Hi, BPJ.

It's messy, but here's a mapping I use for just such a purpose:

" Use <Leader>b to start a bufdo command line that keeps highlighting active
" in the buffers it touches, even if they haven't been loaded yet. Also
" restores the # and % buffers afterward.
noremap <Leader>b :<C-u>let g:bufdo_bufnr=bufnr('%') \| let
g:bufdo_bufnr_prev=bufnr('#') \| bufdo set eventignore-=Syntax \|  \| exec
'buffer '.g:bufdo_bufnr_prev \| exec 'buffer
'.g:bufdo_bufnr<Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>

-- 
        Eric Christopherson

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

Reply via email to