Sunday, September 30, 2012

Re: Change colour of cursor and matching bracket

Erik Christiansen wrote:

> On 30.09.12 11:12, Dotan Cohen wrote:
> > Where in the fine manual is it mentioned how to change the colour of
> > the cursor and the colour of the matching parenthesis / bracket for
> > all file types? I have tried ":h cursor color" and several other
> > phrases, the only relevant one that I found it "h color" which did not
> > lead me to the answer. I have tried "highlight MatchParen cterm=bold
> > ctermfg=red ctermbg=blue" but this did not change the colour of the
> > matching parenthesis or bracket.
>
> For the cursor, I just set the initial colour in the xterm:
>
> col='-fg yellow -bg darkslategrey -cr red' # Colours
> /usr/bin/xterm $col # and lots more options.
>
> In Vim, I then only change the cursor colour to indicate whether we're
> in insert mode or not, without having to look down at the status bar:
>
> " Cursor Appearance: (Insert_Mode == Green, Normal_Mode == Red)
> if &term =~ "xterm"
> let &t_SI = "\<Esc>]12;green\x7"
> let &t_EI = "\<Esc>]12;red\x7"
> endif
>
> But the method could be used in other contexts, I guess.
>
> As regards MatchParen colouring, I've only made sure that is turned
> off, since it drove me nuts when I tried it. The bouncing cursor is more
> than enough.

I also use a different cursor color for Insert mode. It's nice, but
recently it has started to cause terminal window flicker. I asked
Thomas Dickey and he blames Ubuntu Compiz. I'm running Ubuntu 12.04 and
an automatic update about a month ago started the problem. It first
happened after a reboot, one of the updates before that must have caused
it.

Still don't know how to fix it. It gets a bit annoying. Searching for
Ubuntu screen flicker has many hits, but I haven't spotted the right one
yet.

--
VOICE OVER: As the horrendous Black Beast lunged forward, escape for Arthur
and his knights seemed hopeless, when, suddenly ... the animator
suffered a fatal heart attack.
ANIMATOR: Aaaaagh!
VOICE OVER: The cartoon peril was no more ... The Quest for Holy Grail could
continue.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

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

No comments: