On 06-Feb-09 11:14, Lech Lorens wrote: > 2009/2/6 Dewr <[email protected]>: >> Thank you, Tony. but my Vim works well when it is working with _vimrc or >> blahblah.vim. >> I just wanted Vim to keep the syntax-highlighting made by ':setlocal >> filetype=vim'. but Vim loses syntax-highlighting when ':bnext'|':bprevious' >> command is given. >> I thought it's a bug. isn't it a bug? > > It is not. :help 'ft' states that 'ft' is local to a buffer. When you > do :bnext, you change the buffer, so the value of 'ft' changes as > well. Seems logical to me.
Right, but Dewr is doing :bnext followed by :bprev, so he's back at the original buffer! I can reproduce this, and for me, too, this behavior is unexpected. When I manually :set filetype=vim, the buffer's filetype changes and is highlighted as vimscript. After :bnext|bprevious, the buffer's filetype is still 'vim' (okay), but the highlighting is gone. I have to do :syntax enable to let the highlighting show up again. -- regards, ingo --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
