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

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Ory Band
Hey.

Randomly, Vim prints keys I type on the keyboard where my cursor is located, in all modes (normal, insert, visual). For example, in normal mode I press 'j', then an oddly colored 'j' char appears where my cursor was before the cursor moved when char below. This happens in random and inconsistently.

The problem started when I moved from Bash to Zsh with oh-my-zsh, solarized-dark colorscheme. This happened on my Mac OSX and also on Xubuntu, so I guess this is not OS related. This also happens inside and outside tmux.

I have my $TERM set correctly I presume: 'xterm-256-color' outside TMUX, and 'screen-256-color' inside TMUX. In Vim 'term' is set according to outside environment $TERM, and also 't_Co=256'.

Problem occurs with and without 'ttyfast', 'lazyredraw'.

I'm really lost about how to fix this. No hints on the intertubes besides the above. Can anybody help?

Thanks for your time.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Nathan Schwarz
On 09-14/ 2:42, Ory Band wrote:

> Hey.
>
> Randomly, Vim prints keys I type on the keyboard where my cursor is located, in all modes (normal, insert, visual). For example, in normal mode I press 'j', then an oddly colored 'j' char appears where my cursor was before the cursor moved when char below. This happens in random and inconsistently.
>
> The problem started when I moved from Bash to Zsh with oh-my-zsh, solarized-dark colorscheme. This happened on my Mac OSX and also on Xubuntu, so I guess this is not OS related. This also happens inside and outside tmux.
>
> I have my $TERM set correctly I presume: 'xterm-256-color' outside TMUX, and 'screen-256-color' inside TMUX. In Vim 'term' is set according to outside environment $TERM, and also 't_Co=256'.
>
> Problem occurs with and without 'ttyfast', 'lazyredraw'.
>
> I'm really lost about how to fix this. No hints on the intertubes besides the above. Can anybody help?
>
> Thanks for your time.
>
> --
> --
> 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 [hidden email].
> For more options, visit https://groups.google.com/d/optout.

Try disabling oh-my-zsh (however that shouldn't have effect on the
behaviour in bim).
Which terminal emulators do you use?

- Nathan

--
/"\  ASCII Ribbon Campaign
\ /  - against HTML emails
 X   - against proprietory attachments
/ \  http://en.wikipedia.org/wiki/ASCII_Ribbon_Campaign

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Dan Lowe
In reply to this post by Ory Band
On Sun, Sep 14, 2014, at 05:42 AM, Ory Band wrote:
>
> I have my $TERM set correctly I presume: 'xterm-256-color' outside TMUX,
> and 'screen-256-color' inside TMUX. In Vim 'term' is set according to
> outside environment $TERM, and also 't_Co=256'.

I don't know if this has any bearing on your problem, but I believe the
correct terminal names do not have the second hyphen you are using, e.g.
I have always seen these name as follows:

xterm-256color
screen-256color

Dan

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Ory Band
On Monday, September 15, 2014 6:13:30 PM UTC+3, Dan Lowe wrote:

> On Sun, Sep 14, 2014, at 05:42 AM, Ory Band wrote:
>
> >
>
> > I have my $TERM set correctly I presume: 'xterm-256-color' outside TMUX,
>
> > and 'screen-256-color' inside TMUX. In Vim 'term' is set according to
>
> > outside environment $TERM, and also 't_Co=256'.
>
>
>
> I don't know if this has any bearing on your problem, but I believe the
>
> correct terminal names do not have the second hyphen you are using, e.g.
>
> I have always seen these name as follows:
>
>
>
> xterm-256color
>
> screen-256color
>
>
>
> Dan

Yeah, I'm using the correct names (the ones you wrote). I had a typo when writing this post.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Ory Band
In reply to this post by Dan Lowe
On Monday, September 15, 2014 6:13:30 PM UTC+3, Dan Lowe wrote:

> On Sun, Sep 14, 2014, at 05:42 AM, Ory Band wrote:
>
> >
>
> > I have my $TERM set correctly I presume: 'xterm-256-color' outside TMUX,
>
> > and 'screen-256-color' inside TMUX. In Vim 'term' is set according to
>
> > outside environment $TERM, and also 't_Co=256'.
>
>
>
> I don't know if this has any bearing on your problem, but I believe the
>
> correct terminal names do not have the second hyphen you are using, e.g.
>
> I have always seen these name as follows:
>
>
>
> xterm-256color
>
> screen-256color
>
>
>
> Dan

I'm using urxvt on Xubuntu 14.04, but this problem also occured on iTerm2 on Mac OSX Mavericks.

I'll try disabling omzsh and see if it fixes anything.

Any other ideas?

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Ory Band
Doesn't anybody have a clue how to fix this? It's driving me crazy!

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Christian Brabandt

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).

Best,
Christian
--
Liebe ist ein Käfig mit Gitterstäben aus Glück.
                -- Claudia Cardinale

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Jan Larres
Christian Brabandt <[hidden email]>:
> 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.

-Jan

--
-[ OpenPGP key ID: 00A0FD5F ]-
The most dangerous phrase in the language is, "We've always done it this
way."
                -- Grace Hopper

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Christian Brabandt
Hi Jan!

On Fr, 03 Okt 2014, Jan Larres wrote:

> Christian Brabandt <[hidden email]>:
> > 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

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Ory Band
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 <[hidden email]>:
>
> > > 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

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Ory Band
Still, no one has a clue? This happens on almost every file type.

Another idea - Maybe I should compile vim on my own and leave out / leave in some features?

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

romainlafourcade
Le mardi 28 octobre 2014 09:29:28 UTC+1, Ory Band a écrit :
> Still, no one has a clue? This happens on almost every file type.
>
> Another idea - Maybe I should compile vim on my own and leave out / leave in some features?

Try removing these two lines from your vimrc:

    if $TMUX != "" | set term=screen-256color | endif
    set t_Co=256

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Ory Band
I had the problem on my macbook pro 2010 before using tmux when using iterm2, so I guess this won't solve it.

Ory Band - אורי בנד


On Wed, Oct 29, 2014 at 11:36 AM, <[hidden email]> wrote:
Le mardi 28 octobre 2014 09:29:28 UTC+1, Ory Band a écrit :
> Still, no one has a clue? This happens on almost every file type.
>
> Another idea - Maybe I should compile vim on my own and leave out / leave in some features?

Try removing these two lines from your vimrc:

    if $TMUX != "" | set term=screen-256color | endif
    set t_Co=256

--
--
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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/UVxDG3lMQ0U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Ory Band
In reply to this post by Ory Band
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 <[hidden email]>:
> >
> > > > 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 [hidden email].
For more options, visit https://groups.google.com/d/optout.