Hi, > When my .vimrc is running, creating the BufAdd autocmds, all of the > files (*.c) I think already have buffers assigned to them. I'm not sure, > but this could cause the problem. A simple fix would just be a manual > buffer count on VimEnter. I'm getting close to the best solution.
I think this would be great chance to to it realy fast: 1. define a function which counts all buffers and stores the count to a global variable bufcount 2. start this function in .vimrc to initialize bufcount 3. add bufcount to your ruler 4. add BufEnter and BufLeave autocommands which increase/decrease bufcount var. With this solution you just show a static variable in your ruler, it's as fast as possible. And if you're in doubt, you can call the "initialize function" - this will be your "redraw" analogy I think this solution would be nice - if you can execute the .vimrc code after all buffers loading. Which is not the default, I think. Mainly because the BufEnter autocommand definitions set in .vimrc couldn't work for opening files mentioned at cmdline... So there must be a trick to delay some .vimrc code execution. Milan Vancura