From owner-freebsd-questions@FreeBSD.ORG Wed Sep 10 14:52:17 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5251C9C for ; Wed, 10 Sep 2014 14:52:17 +0000 (UTC) Received: from dnvrco-oedge-vip.email.rr.com (dnvrco-outbound-snat.email.rr.com [107.14.73.230]) by mx1.freebsd.org (Postfix) with ESMTP id 99C411E1E for ; Wed, 10 Sep 2014 14:52:17 +0000 (UTC) Received: from [204.210.114.114] ([204.210.114.114:19185] helo=localhost.hawaii.res.rr.com) by dnvrco-oedge01 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 77/50-18326-0A560145; Wed, 10 Sep 2014 14:52:16 +0000 Received: by localhost.hawaii.res.rr.com (Postfix, from userid 1000) id 7E2E75CF1; Wed, 10 Sep 2014 04:54:56 -1000 (HST) Date: Wed, 10 Sep 2014 04:54:56 -1000 From: Parv To: Polytropon Subject: Re: vim and cursor-over-"chars" question Message-ID: <20140910145456.GA4616@holstein.holy.cow> Mail-Followup-To: Polytropon , Johannes-Maria Kaltenbach , freebsd-questions@freebsd.org References: <20140910132008.GA1958@localhost> <20140910131448.GA1574@holstein.holy.cow> <20140910152834.3aa4f6f6.freebsd@edvax.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140910152834.3aa4f6f6.freebsd@edvax.de> X-RR-Connecting-IP: 107.14.64.118:25 X-Authority-Analysis: v=2.1 cv=btPCBSqi c=1 sm=1 tr=0 a=lLOF/jpPrR0dcgWXP1EvZg==:117 a=lLOF/jpPrR0dcgWXP1EvZg==:17 a=ayC55rCoAAAA:8 a=d6ebF5wNKiAA:10 a=ffvOtQSCAxIA:10 a=R5FhY6rjjCMA:10 a=kj9zAlcOel0A:10 a=Ymsr-CWnAAAA:8 a=s8ef7jeFeYUA:10 a=WISP94fyhCtObs7IlWwA:9 a=CjuIK1q_8ugA:10 a=jKRid43F7UoA:10 X-Cloudmark-Score: 0 Cc: Johannes-Maria Kaltenbach , freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 14:52:17 -0000 in message <20140910152834.3aa4f6f6.freebsd@edvax.de>, wrote Polytropon thusly... > > On Wed, 10 Sep 2014 03:14:48 -1000, Parv wrote: > > in message <20140910132008.GA1958@localhost>, > > wrote Johannes-Maria Kaltenbach thusly... > > > > > ... > > > or you can set this xterm configuration in your .vimrc: > > > > > > for cursor in command mode: > > > > > > let &t_EI = "\]12;orange\x7" > > > > > > and in insert mode: > > > > > > let &t_SI = "\]12;orange\x7" > > > > > > where you can choose a different colour. > > > > Thanks much, Johannes-Maria. > > > > Only thing is that cursor color (with which xterm was started) is > > not restored after editing or opening a file in vim. I can live with > > that. > > This is correct, and the setting does not apply to gvim. > Otherwise it works nicely in xterm. Well there is a workaround, sort of, of setting the cursor same/similar (to xterm cursor color) before leaving vim ... " Cursor color (original xterm cursor color is not restored; see " 'termcap-cursor-shape' help topic for reference): if &term =~ "xterm" " insert mode; let &t_SI = "\]12;green\x7" " command mode let &t_EI = "\]12;orange\x7" " color changes in command mode only after being in insert mode " first; so try once more; silent !echo -ne "\033]12;orange\x7" " Restore old xterm color; need to physically change here to " match the one set at xterm launch. autocmd VimLeave * silent !echo -ne "\033]12;grey\x7" endif --