Sunday, September 30, 2012

Re: Change colour of cursor and matching bracket

Bram Moolenaar wrote:

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


I also use different colors for the cursor in insert mode
vs normal mode with xubuntu-12.04 (with all updates)
and I have not noticed any flicker. Perhaps you can
try whether installing xfce solves your flicker issue:

1/ sudo apt-get update
2/ sudo apt-get install xubuntu-desktop
3/ Log out.
4/ Select xfce to login

I remember having very slow refresh and flicker
in vim a long time ago, and solved it at the time
by installing the latest Nvidia driver.

-- Dominique

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