Saturday, May 9, 2015

Re: zsh, solarized: Random typed keys shown on screen with wierd colors.

On Tuesday, October 14, 2014 at 10:47:24 AM UTC+3, Ory Band wrote:
> On Friday, October 3, 2014 2:36:52 PM UTC+3, Christian Brabandt wrote:
> > Hi Jan!
> >
> >
> >
> > On Fr, 03 Okt 2014, Jan Larres wrote:
> >
> >
> >
> > > Christian Brabandt <cblists@256bit.org>:
> >
> > > > On So, 28 Sep 2014, Ory Band wrote:
> >
> > > >> Doesn't anybody have a clue how to fix this? It's driving me crazy!
> >
> > > >
> >
> > > > Are you using any plugins? I have seen something like this, when Vim is
> >
> > > > busy executing e.g. autocommands that take a little while (or when the
> >
> > > > system is under heavy load).
> >
> > >
> >
> > > I just wanted to chime in that I'm also experiencing this on Linux with
> >
> > > urxvt (and zsh, but without oh-my-zsh). It doesn't seem to be related to
> >
> > > the machine/Vim being busy in any way, it can happen at any time.
> >
> > >
> >
> > > The only plugin-related thing I could think of having an influence are
> >
> > > ones that use a CursorMoved/CursorMovedI autocommand, which for me are:
> >
> > >
> >
> > > :autocmd CursorMoved
> >
> > > --- Auto-Commands ---
> >
> > > CursorMoved
> >
> > > * call UltiSnips#CursorMoved()
> >
> > > matchparen CursorMoved
> >
> > > * call s:Highlight_Matching_Pair()
> >
> > > youcompleteme CursorMoved
> >
> > > * call s:OnCursorMovedNormalMode()
> >
> > >
> >
> > > I haven't tried selectively disabling them yet to see wether one of them
> >
> > > is the culprit as the problem is a bit sporadic and I use these plugins
> >
> > > regularly, but maybe I should still give it a shot.
> >
> >
> >
> > Does it happen, without youcompleteme?
> >
> >
> >
> > Best,
> >
> > Christian
> >
> > --
> >
> > Älter werden bedeutet, mit Eleganz Dinge sein lassen zu können.
> >
> > -- Reinhard Mey
>
> I can say for myself that for me it does happen with YCM disabled, and I have tried turning off "busy" plugins to no avail. Disabling plugins might postpone the problem a bit, but it eventually start showing after vim has been running for some time (like 10 minutes or so).
>
> I've no clue what is causing this.
>
> Here's my .vimrc, you can see the plugins at the top (using Vundle): https://github.com/oryband/dotvim/blob/master/.vimrc

Well, I'm reviving this post because I've made some progress and also for the sake of documentation. People might find this useful:

I've seem to track down the origin of the problem, but haven't quite solved it. It's related to 2 things: Vim's slow way of coloring syntax and vim's slow regex engine. Which both come down to that fact that Vim does some thing slowly, which make it print garbage characters to the screen.

See the following issue on the vim-go plugin repo. It happened a lot when writing go, and apparently it was because the plugin uses heavy regex matching to color syntax:

https://github.com/fatih/vim-go/issues/145
https://github.com/fatih/vim-go/issues/388

I haven't noticed it before, but this bug is visible when moving through long code lines. This probably caused vim to make "heavy regex calculations" on that line which took some time to finish, resulting in garbage characters.

If I turn of syntax coloring after a certain column using `set synmaxcol=100` (instead of my default `synmaxcol=3000`, who knows which plugin set this), then this bug is reduced dramatically, because vim doesn't check the regex past the 100th column. However, this still pops up every now and then, and not completely fixed.

If anyone here has some deeper knowledge of vim and can help me with completely fixing this bug, I'll be grateful.

Thanks!

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment