[vim] Long line make VIM slow but... (#555)

126 views
Skip to first unread message

Deluxo

unread,
Jan 12, 2016, 7:34:33 PM1/12/16
to vim/vim

Hello

As everybody knows already, long lines make vim slow

However, recently I have found the synmaxcol variable
It makes vim much more responsive, as you may already know

The interesting part is this:

  • vimrc has synmaxcol=256
  • open file with a long line (its all fine Vim's fast)
  • :set syntax=on -set synmaxcol=9999

Result:
Vim is still much faster than without synmaxcol, although not as fast as without syntax highlighting

Also, if i set synmaxcol, the long line that exeeds the limit stops being highlighted, and the next lines aren't highlighted properly any more, ie after a long line, highlighting is broken and off-sync


Reply to this email directly or view it on GitHub.

Christian Brabandt

unread,
Jan 13, 2016, 1:37:36 AM1/13/16
to vim/vim

Also, if i set synmaxcol, the long line that exeeds the limit stops being highlighted, and the next lines aren't highlighted properly any more, i.e. after a long line, highlighting is broken and off-sync.

That is to be expected.

However I don't understand what this issue is for. Please discuss user questions at the vim-use ml. Closing.

Christian Brabandt

unread,
Jan 13, 2016, 1:37:39 AM1/13/16
to vim/vim

Closed #555.

Deluxo

unread,
Jan 14, 2016, 2:38:17 PM1/14/16
to vim/vim

The issue lies in the chain of settings in exactly this order:
syntax=on - slow
synmaxcol=200 - parts of text syntax highlighting messes up after the long line, but is fast
syntax=on - turning on full syntax highlighting again, only this time it's almost as fast as with synmaxcol=200, however even long lines are properly colored.

It's is not a bug per se, but a very awkward behaviour at minimum.

Hugo Oliveira

unread,
Mar 3, 2016, 4:25:54 AM3/3/16
to vim/vim

@chrisbra, I can also confirm the behaviour of @Deluxo. Using the kludge of setting synmaxcol to a high value and calling syntax on again make scrolling faster. Can you explain why?

I have syntax on on my vimrc and editing latex files with synmaxcol really large make it much slower. doing @deluxo kludge make things much better (not super fast but fine for text editing).

Cheers

Christian Brabandt

unread,
Mar 3, 2016, 4:36:38 AM3/3/16
to reply+00b1d198f8096dfca913fde5523282efa95b815...@reply.github.com, vim...@googlegroups.com
Am 2016-03-03 10:25, schrieb Hugo Oliveira:
> @chrisbra [1], I can also confirm the behaviour of @Deluxo [2]. Using
> the kludge of setting synmaxcol to a high value and calling syntax on
> again make scrolling faster. Can you explain why?

Please discuss this on the vim-use ml. This is no user support forum
here.

Charles E Campbell

unread,
Mar 3, 2016, 9:18:37 AM3/3/16
to vim...@googlegroups.com
Hugo Oliveira wrote:
>
> @chrisbra <https://github.com/chrisbra>, I can also confirm the
> behaviour of @Deluxo <https://github.com/Deluxo>. Using the kludge of
> setting synmaxcol to a high value and calling syntax on again make
> scrolling faster. Can you explain why?
>
> I have syntax on on my vimrc and editing latex files with synmaxcol
> really large make it much slower. doing @deluxo
> <https://github.com/deluxo> kludge make things much better (not super
> fast but fine for text editing).
>
>
On the off-chance that participants in this "issue" will pay attention
to the mailing list instead of the bugtracker...have any of you read
:help tex-slow ? In particular, the hint given about folding.

Apologies for responding to vimdev, because this "issue" really should
have been on the vim mailing list.

Chip Campbell
Reply all
Reply to author
Forward
0 new messages