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

86239Re: vim7 chokes on simple text file

Expand Messages
  • Daniel Fetchinson
    Jan 5, 2008
    • 0 Attachment
      > > I've upgraded to vim 7 recently and to my biggest surprise I've
      > > noticed that this most recent version of vim chokes on a simple text
      > > file (it's javascript source for the ext.js javascript library):
      > > http://extjs.com/deploy/dev/adapter/ext/ext-base.js
      > >
      > > The file is small the only peculiarity is that it has 2 very long
      > > lines. I always liked vim because it was the most robust editor out
      > > there but I'm not really sure why this simple text file is giving it
      > > such a hard time. I renamed it to something else so the javascript
      > > syntax highlighting doesn't kick in and still CPU usage shoots up to
      > > 100% when I'm moving around the file.
      > >
      > > Unfortunately I don't have the earlier version of vim anymore but I
      > > don't think I've seen anything like this with those earlier very
      > > stable releases. Anyone could check it out so we know if it's version
      > > 7 specific or something else?
      > >
      > > Cheers,
      > > Daniel
      >
      > Works for me (even with js syntax highlighting) on Linux with gvim 7.1.203
      > for
      > GTK2/Gnome.

      I have VIM 7.1 (2007 May 12, compiled Oct 4 2007 10:45:32)
      Included patches: 1-135
      Modified by <bugzilla@...>

      Also on linux.

      > Moving around (e.g. using j k <End> etc.) gives me no problem. I
      > didn't try making changes in the long lines.
      >
      > - You say "vim chokes". What are the exact symptoms you got?

      CPU usage shootes up to 100% for an extended period of time (5-10
      seconds) and vim becomes unresponsive in the meantime.

      These are the steps which are consistently reproducing the issue:

      1. open the file
      2. gg
      2. move a couple of line down until the last line starting with
      (function(........
      3. move right until you hit the first curly bracket {
      4. CPU usage shoots up to 100% and vim becomes unresponsive
      5. after 5-10 seconds vim comes back live

      Maybe "choking" is too strong a word :)
      Vim doesn't actually hang just takes a little time out.

      The problem is clearly with finding the matching braces, } in the above case.

      > - Does it or doesn't it work with
      >
      > gvim -N -u NORC

      Same as above.

      > and/or with something similar to
      >
      > gvim -u "C:\Program Files\vim\vim71\vimrc_example.vim"
      > gvim -u /usr/local/share/vim/vim71/vimrc_example.vim
      >
      > etc. (depending on where the Vim 7 runtime files are on your system)?
      >
      > If it works with one of the above, the problem is probably with your vimrc.
      >
      >
      > I notice that the last two lines (several thousand characters long) end in
      > LF
      > only while the rest ("short" lines) end in CR+LF. Is that intentional?

      I have no idea :) I didn't write this code just came across it from
      the ext.js website.

      > I can
      > cure it (on my gvim which reads the file with no problem) using
      >
      > :set ffs=
      > :e ++ff=dos ext-base.js
      > :w ++ff=unix
      > " or just :w if you want CR+LF all over
      > :q
      >
      >
      > Best regards,
      > Tony.


      Cheers,
      Daniel

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Show all 13 messages in this topic