From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19448 invoked by alias); 17 Dec 2014 08:48:29 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 33990 Received: (qmail 875 invoked from network); 17 Dec 2014 08:48:15 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: **** X-Spam-Status: No, score=4.1 required=5.0 tests=BAYES_40,RCVD_IN_BRBL_LASTEXT, RCVD_IN_PSBL autolearn=no version=3.3.2 Date: Wed, 17 Dec 2014 08:58:18 +0100 From: Nathan Schwarz To: zsh-workers@zsh.org Subject: Re: Fwd: In Vi mode, show whether "insert" or "command" state is active Message-ID: <20141217075818.GA5675@Persephone> Mail-Followup-To: zsh-workers@zsh.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - roshared2.hosthash.com X-AntiAbuse: Original Domain - zsh.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - notwhite.ro X-Get-Message-Sender-Via: roshared2.hosthash.com: authenticated_id: nathan@notwhite.ro This is already possible. The guys haven't read the manual. zle-keymap-select () { if [ $KEYMAP = vicmd ]; then PROMPT="$(setPrompt ':')" else PROMPT="$(setPrompt '>')" fi zle reset-prompt } zle -N zle-keymap-select This is my personal setup, but you can put in anything you want (obviously). For the blinking-cursor-stuff you can use this: zle-keymap-select () { if [ $KEYMAP = vicmd ]; then echo -en "\e[5 q" else echo -en "\e[1 q" fi zle reset-prompt } zle -N zle-keymap-select -Nathan Ps: Sorry for double-sending Jason, I replied to you instead of replying to the ml. -- /"\ ASCII Ribbon Campaign \ / - against HTML emails X - against proprietory attachments / \ http://en.wikipedia.org/wiki/ASCII_Ribbon_Campaign