On Wed, Jun 14, 2006 at 10:13:37AM -0400, Jack Donohue wrote: > Just started using vim 7 (I know, I'm a "late adopter"), and mostly I like > it, but I've noticed a couple of quirks. One is that it seems to lose > syntax context when switching windows. I will have a perl source file > open, everything looks fine. Then I switch to another window (actual > Window window with Alt-Tab), when I come back the entire thing is > highlighted as literal text. I have a lot of literal text in this file, > and I have seen this happen with old Vim 6.3, but it seems to be happening > more often with Vim 7.
This is not normal behavior: for me, nothing much changes when I switch away from and back to my gvim window. A few ideas: Does CTRL-L fix the display? Do you have any FocusGained or FocusLost autocommands? :au FocusGained :au FocusLost Do you have the same problems if you start vim without your usual vimrc file? $ gvim --noplugin -u $VIMRUNTIME/vimrc_example.vim -U \ $VIMRUNTIME/gvimrc_example > Another is that the syntax highlighting doesn't seem to happen > automatically. When I do :filetype it comes back as conf. I have to put a > syntax on line in the appropriate ftplugin file for it to happen. Is this > something new? Maybe you mean :set filetype? and not :filetype ? Do you have something like :filetype plugin on and :syntax on in your vimrc file? What does :verbose set filetype? tell you? How about the last few lines of :scriptnames after loading the file? HTH --Benji Fisher