Message from discussion
Change colour of cursor and matching bracket
Received: by 10.66.84.38 with SMTP id v6mr3790527pay.7.1349004578403;
Sun, 30 Sep 2012 04:29:38 -0700 (PDT)
X-BeenThere: vim_use@googlegroups.com
Received: by 10.68.237.161 with SMTP id vd1ls19963624pbc.3.gmail; Sun, 30 Sep
2012 04:29:31 -0700 (PDT)
Received: by 10.66.79.165 with SMTP id k5mr2107687pax.10.1349004571207;
Sun, 30 Sep 2012 04:29:31 -0700 (PDT)
Received: by 10.66.79.165 with SMTP id k5mr2107686pax.10.1349004571197;
Sun, 30 Sep 2012 04:29:31 -0700 (PDT)
Return-Path: <e...@internode.on.net>
Received: from ipmail05.adl6.internode.on.net (ipmail05.adl6.internode.on.net. [2001:44b8:8060:ff02:300:1:6:5])
by gmr-mx.google.com with ESMTP id j3si3381990paz.2.2012.09.30.04.29.30;
Sun, 30 Sep 2012 04:29:31 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of e...@internode.on.net designates 2001:44b8:8060:ff02:300:1:6:5 as permitted sender) client-ip=2001:44b8:8060:ff02:300:1:6:5;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of e...@internode.on.net designates 2001:44b8:8060:ff02:300:1:6:5 as permitted sender) smtp.mail=e...@internode.on.net
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AvULADcsaFB20ca0/2dsb2JhbABFhSJptGaCNgICgQqBCYIgAQEFIzMzCAMYAgImAgIUGA0kiBenepF6gSGKLBGBHoNcMmADlWiQLIJ5
Received: from ppp118-209-198-180.lns20.mel6.internode.on.net (HELO ratatosk) ([118.209.198.180])
by ipmail05.adl6.internode.on.net with ESMTP; 30 Sep 2012 20:59:29 +0930
Received: by ratatosk (Postfix, from userid 1000)
id 6A293602E1; Sun, 30 Sep 2012 21:29:45 +1000 (EST)
Date: Sun, 30 Sep 2012 21:29:45 +1000
From: Erik Christiansen <dva...@internode.on.net>
To: vim use <vim_use@googlegroups.com>
Subject: Re: Change colour of cursor and matching bracket
Message-ID: <20120930112945.GA2292@ratatosk>
Reply-To: dva...@internode.on.net
Mail-Followup-To: vim use <vim_use@googlegroups.com>
References: <CAKDXFkOoXfU6pCJoLmCE4iUii_wSkU68mQdg=TZUR2h--O+ySA@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <CAKDXFkOoXfU6pCJoLmCE4iUii_wSkU68mQdg=TZUR2h--O+...@mail.gmail.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
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.
Erik
--
Habit is habit, and not to be flung out of the window by any man, but
coaxed down-stairs a step at a time.
- Mark Twain, "Pudd'nhead Wilson's Calendar