On Wed, November 25, 2009 2:49 am, Craig Barkhouse wrote:

> 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.

When issuing :bufdo, the Syntax autocommand event is added to the
'eventignore' option, so that bufdo can perform faster. This is
described at :h :bufdo

If you don't like this, you could possibly set this option within the
:bufdo command like this:

vim -c "bufdo set ei=| normal gg" *.c

> P.S.  I actually don't remember why I set 'hidden' in my .vimrc, it's
> just been that way for so long!

It enables you to switch buffers, even when the current buffer is
modified. Otherwise you would have save the current buffer before
switching to another one.

regards,
Christian


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui