Hi all,
I’ve had some occasions where I’ve been editing
multiple files at once, and for some reason some of the files did not get syntax
highlighting turned on. I could never really pinpoint the circumstances
until today when I decided to use a binary search approach to track down what
it might be.
The problem occurs with 7.2.293 that I’ve compiled as
well as stock 7.2 with the following 3-line .vimrc:
set hidden
filetype on
syntax on
And then invoke Vim as follows in a directory that has
several .c files (it seems you could use any :bufdo command here, this is just
an example):
vim -c “bufdo normal gg” *.c
The problem I see is that the first and last buffers have
syntax highlighting, but all the intermediate buffers do not. For
example, if there are 10 .c files, then only buffers 1 and 10 will have syntax
highlighting.
There are several different components interacting in this
scenario, so I’m not sure which are actually necessary to cause the
problem, and which are just there to expose the problem. I suspect the
problem may be in the interaction between ‘hidden’ and :bufdo,
since both of those involve buffers.
Craig
P.S. I actually don’t remember why I set ‘hidden’
in my .vimrc, it’s just been that way for so long!
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---