Loading ...
Sorry, an error occurred while loading the content.

Re: vanishing syntax highlighting problem

Expand Messages
  • Tony Mechelynck
    ... From: Hari Krishna Dara To: Sent: Monday, August 01, 2005 11:03 PM Subject: vanishing syntax highlighting problem ...
    Message 1 of 6 , Aug 1, 2005
    • 0 Attachment
      ----- Original Message -----
      From: "Hari Krishna Dara" <hari_vim@...>
      To: <vim@...>
      Sent: Monday, August 01, 2005 11:03 PM
      Subject: vanishing syntax highlighting problem


      >
      > For the last few days, I have been having a weird problem with syntax
      > highlighting. After using my vim session for a few hours/days, suddenly
      > the syntax highlighting stops working and even explicitly doing "syntax
      > off" followed by a "syntax on" doesn't work. The problem almost always
      > starts (or noticed) when a new buffer is loaded. If the new buffer is
      > loaded in a split window, the other window still shows the syntax
      > highlighting, but after a refresh even that clears up. Every time this
      > happens, I have to restart my vim session to fix the problem. The
      > filetype detections seems to be working fine. The problem might have
      > started because of some new plugin I addeed or changes that I did to
      > vimrc/my plugins (I didn't upgrade my vim for sometime), but how do I
      > debug this issue? What should I check for when this happens? Since the
      > problem is not reproducible, it is not easy to narrow down to a specific
      > plugin.
      >
      > --
      > Thanks a lot,
      > Hari

      [ad banner snipped]

      Next time it happens, try the following in the window which exhibits the
      problem

      :verbose set filetype? syntax?
      :filetype
      :syntax

      You might also check the bottom of the output of ":scriptnames" for the most
      recently loaded scripts.

      As of this writing, the most recent versions are 6.3.086 (stable) and
      7.00aa.0121 (alpha, release date 2005 Jul 31). If your current version (as
      shown in the firt few lines of the ":version" output) is much older than
      that, you might consider upgrading.

      I don't know if this will help you much, but it's all I can think of at the
      moment.

      Best regards,
      Tony.
    • Tim Chase
      ... Well, given that you describe that it seems to occur when editing certain new buffers, do you know what sorts of filetype those get registered as? If
      Message 2 of 6 , Aug 1, 2005
      • 0 Attachment
        > vimrc/my plugins (I didn't upgrade my vim for sometime), but
        > how do I debug this issue? What should I check for when this
        > happens? Since the problem is not reproducible, it is not easy
        > to narrow down to a specific plugin.

        Well, given that you describe that it seems to occur when editing
        certain new buffers, do you know what sorts of filetype those get
        registered as? If they're some particular extension, or some key
        first-line or something of the sort, you may be able to track
        down from there. I'd hate to subject you to using the "-u NONE"
        settings for long durations (hey look, folks...I've learned to
        drop the "-U NONE" :) as the colors hurt my eyes :)

        The next time you note it happening, take note what type of file
        you're editing and see if you can tell how you entered it (did
        you copy & paste? just open it with ":e blah.foo"? etc) The
        results of something like

        :set ft? syntax?

        Additionally, does the file in question have a modeline at the
        top or bottom to direct Vim to use some particular flavor of
        filetype or syntax?

        Sorry this isn't a "wham, here's your answer" but rather more of
        a "here's a slightly better airbag for the next time you crash"
        sorta answer, but it should get you a bit more in-flight
        information when it happens next to try and diagnose it from there.

        -tim
      • Hari Krishna Dara
        ... I will do that. I checked filetype and it was set correctly. ... I am using Vim 6.3 with patches 1-31. If I don t get a solution, I will also try
        Message 3 of 6 , Aug 1, 2005
        • 0 Attachment
          On Mon, 1 Aug 2005 at 11:55pm, Tony Mechelynck wrote:

          > ----- Original Message -----
          > From: "Hari Krishna Dara" <hari_vim@...>
          > To: <vim@...>
          > Sent: Monday, August 01, 2005 11:03 PM
          > Subject: vanishing syntax highlighting problem
          >
          >
          > >
          > > For the last few days, I have been having a weird problem with syntax
          > > highlighting. After using my vim session for a few hours/days, suddenly
          > > the syntax highlighting stops working and even explicitly doing "syntax
          > > off" followed by a "syntax on" doesn't work. The problem almost always
          > > starts (or noticed) when a new buffer is loaded. If the new buffer is
          > > loaded in a split window, the other window still shows the syntax
          > > highlighting, but after a refresh even that clears up. Every time this
          > > happens, I have to restart my vim session to fix the problem. The
          > > filetype detections seems to be working fine. The problem might have
          > > started because of some new plugin I addeed or changes that I did to
          > > vimrc/my plugins (I didn't upgrade my vim for sometime), but how do I
          > > debug this issue? What should I check for when this happens? Since the
          > > problem is not reproducible, it is not easy to narrow down to a specific
          > > plugin.
          > >
          > > --
          > > Thanks a lot,
          > > Hari
          >
          > [ad banner snipped]
          >
          > Next time it happens, try the following in the window which exhibits the
          > problem
          >
          > :verbose set filetype? syntax?
          > :filetype
          > :syntax
          >
          > You might also check the bottom of the output of ":scriptnames" for the most
          > recently loaded scripts.

          I will do that. I checked 'filetype' and it was set correctly.

          >
          > As of this writing, the most recent versions are 6.3.086 (stable) and
          > 7.00aa.0121 (alpha, release date 2005 Jul 31). If your current version (as
          > shown in the firt few lines of the ":version" output) is much older than
          > that, you might consider upgrading.

          I am using Vim 6.3 with patches 1-31. If I don't get a solution, I will
          also try upgrading to patch level 86.

          >
          > I don't know if this will help you much, but it's all I can think of at the
          > moment.

          Thanks, I hope I can get more information next time.

          >
          > Best regards,
          > Tony.


          For Aaron, I am not using minibufexplorer.

          --
          Thanks,
          Hari



          __________________________________
          Yahoo! Mail for Mobile
          Take Yahoo! Mail with you! Check email on your mobile phone.
          http://mobile.yahoo.com/learn/mail
        • Hari Krishna Dara
          ... Today when it happened, it was on a sql file, and the ft was set as expected. I am not sure if it was on sql files before. I can t use -u NONE for a
          Message 4 of 6 , Aug 1, 2005
          • 0 Attachment
            On Mon, 1 Aug 2005 at 4:55pm, Tim Chase wrote:

            > > vimrc/my plugins (I didn't upgrade my vim for sometime), but
            > > how do I debug this issue? What should I check for when this
            > > happens? Since the problem is not reproducible, it is not easy
            > > to narrow down to a specific plugin.
            >
            > Well, given that you describe that it seems to occur when editing
            > certain new buffers, do you know what sorts of filetype those get
            > registered as? If they're some particular extension, or some key
            > first-line or something of the sort, you may be able to track
            > down from there. I'd hate to subject you to using the "-u NONE"
            > settings for long durations (hey look, folks...I've learned to
            > drop the "-U NONE" :) as the colors hurt my eyes :)

            Today when it happened, it was on a sql file, and the 'ft' was set as
            expected. I am not sure if it was on sql files before. I can't use "-u
            NONE" for a long time not only because it will be really hard to work
            like that (I can't believe I said that as Vi used to be my only editor
            before I discovered Vim, and Vim with "-u NONE" option is still several
            orders better than Vi), but also because I don't know how long I have to
            work like that to confirm anything. More over, I haven't changed my vim
            version for a long time (file is dated 17-Nov-2004), and I have been
            observing the problem only recently.

            >
            > The next time you note it happening, take note what type of file
            > you're editing and see if you can tell how you entered it (did
            > you copy & paste? just open it with ":e blah.foo"? etc) The
            > results of something like
            >
            > :set ft? syntax?
            >

            Yes, this time I first observed the problem when I opened up a file from
            the grep results shown by my greputils.vim, so if it happens again I
            will take a note and observe some pattern.

            > Additionally, does the file in question have a modeline at the
            > top or bottom to direct Vim to use some particular flavor of
            > filetype or syntax?

            No, there were no modelines.

            >
            > Sorry this isn't a "wham, here's your answer" but rather more of
            > a "here's a slightly better airbag for the next time you crash"
            > sorta answer, but it should get you a bit more in-flight
            > information when it happens next to try and diagnose it from there.
            >
            > -tim

            I understand, I had no clue on how to approach, and hopefully you folks
            can help me go in the right direction.

            --
            Thanks,
            Hari



            ____________________________________________________
            Start your day with Yahoo! - make it your home page
            http://www.yahoo.com/r/hs
          • Charles E. Campbell, Jr.
            ... Hello, Hari! May I throw another suggestion or two into the hat? * have you made any recent changes to your ? * have you recently added/upgraded
            Message 5 of 6 , Aug 2, 2005
            • 0 Attachment
              Hari Krishna Dara wrote:

              >For the last few days, I have been having a weird problem with syntax
              >highlighting...
              >
              Hello, Hari!

              May I throw another suggestion or two into the hat?

              * have you made any recent changes to your <.vimrc>?
              * have you recently added/upgraded any plugins/ftplugins/etc?

              Do you have any backups of, say, a month ago when you weren't having
              problems.
              I suggest restoring from your backups (assuming you have any): .vimrc
              and the .vim/
              directory tree. Move your current .vimrc and .vim to something safe
              first, like
              DOTVIMRC and DOTVIM.

              Do your usual editing and see if your problem recurs. If it doesn't,
              then look for
              changes (use vimdiff, diff, cmp, etc).

              If it does, then use an even older backup :) . I would also suggest
              that you upgrade
              your vim, just in case some patch has already fixed whatever is ailing you.

              Regards, and good luck!
              Chip Campbell
            Your message has been successfully submitted and would be delivered to recipients shortly.