From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17786 invoked by alias); 26 Dec 2014 11:38:12 -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: 34054 Received: (qmail 12193 invoked from network); 26 Dec 2014 11:37:57 -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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1419593533; bh=EJhBAwBKPAT2eESTuVS3trW9rp0c05Hpi+9nevoYgSk=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=AsIKA0n1zQVcOqFmSP2RtZcvTGECZeuFxxUQm0G/0N1rtrvo5d94dl4guGhJLsAsMG2cYKv78ZZnisW7yDijMbtuPCMlhIZainK00jAovk/e9WeFZlyQHnj80sqNXM8QitBosqwv2tKQONjK30St0TaT49SccO5/deM/dDAbSE6gK8vlRIDOHN62J9nIDtqg+efbJ9QAsH02hIbmKNmfNUnBYv22ItcqDe9NlHc7UBhbDZPiV+oWS160JbWkXefjITTNiznj2+sucEcuETSU0jAc/EuKYDlLcpJWM+MzW/la2++fOBU8S8iGSjDC3yeL3pWuUsdPCYG/oVs24tjVGQ== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.co.uk; b=KyPky8m0qcTe1z3hojvQQWdDEZjM+o7Jw9kVJjc+fwlyvN3sUa/XGkEjpG6RzOUJtOb95MjQNTXfZpF16MvdwYNDNu/Oc9MK03lxiYHeC7MjKDuBV080uHjC1Jsw9XTF98pBsGADUyVk/2XKt6Ce7OlEClUBReyt6zFm/MDoppUG/r+Fe0HX3Sw3cScLk5+SLrlMql2SRAkYavgEAwe7acS1kYy7x7LKBlbbzEvudV74oZKvNCqG6xfS2BL5D4Iz2U5oeFBI/QLNhiYSCgtsX1ZDSCkt/GP0IxCIg5B16IYM63UnAr9cmsRE0ibK7tK/rDVIyrlLmasp2UV+GGXaMw==; X-Yahoo-Newman-Id: 311359.52523.bm@smtp115.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Sbk_33kVM1lEt7LwYp7arcs5KfbeemdRmQiSdzRQ7wb1xqr qdwzfG83z4_QfWjn2uZPxZJOvAmOt6mWd4PdB2iEkgU0lmbv1GcfJY7JT_rg AO3rCoLdz0Ce_G0t1CxV5UPX3MwBnYpHoaKBSVZcX_Sz6xhO7WY8z_7w1YP3 ogfoCTtKu_Qx3uQU8OA73rwNM521crGJnVU3N3DjTPFiw3f6oGNvwPnkrKhn 1wfv6xIVclAmjkqN6pTYRiXd_o4gJGkziYdmsd.9Eg4flEj_88qwGd2BqMzR Ngwo5EPp.qbDu5zFOD5oQn1.l3RhrTGF.U6hZaFSuFoqvd.WnSx.EghHnDs9 1j.GEjdf87Nf70V0wifT5ejwiD6LAQZLvJRk6EB7tc3YHWI7Sjbhfamm2W2j bd4O5wVviqYLObdrfBxYTOHlI7zZgTTO55GWXdU1r.bi1k..ItqOs6tLoEmB 7i6bW6j8mc0sxodkz5oMUfVS3YqsavDN4dw_3zcMTZflt3GWaxYhx701BAhH ZD0idGQPVbWQIxsvoVjGP_gtEra3pvQ-- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- In-reply-to: <141225151837.ZM15719@torch.brasslantern.com> From: Oliver Kiddle References: <141221175723.ZM5756@torch.brasslantern.com> <8569631419273880@web5h.yandex.ru> <1441071419539683@web21o.yandex.ru> <141225151837.ZM15719@torch.brasslantern.com> To: "zsh-workers@zsh.org" Subject: Re: In Vi mode, show whether "insert" or "command" state is active MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27237.1419593291.1@thecus.kiddle.eu> Date: Fri, 26 Dec 2014 12:32:12 +0100 Message-ID: <27275.1419593532@thecus.kiddle.eu> Bart wrote: > Yes, I was only providing an example / starting point. For this to work > better we'd need another zleentry token or the like, to be able to query > the keymap and state without requiring getsparam() calls and without the > extra prompt redraw from inside zle-line-init. Also keymap selection > and possibly other state changes should always redraw the prompt (as an > example, there currently is no hook when entering overwrite mode). Do we really want the whole prompt redrawn? It's annoying if conditional parts of the prompt evaluate differently causing it to change size. With my current setup, I have a number of things setup to preserve this state. So for example. with the return status I also need zle-line-init to contain: typeset -g __prompt_status="$?" And zle-keymap-select has: () { return $__prompt_status } zle reset-prompt Would a feature be somehow possible where a fixed set of characters are marked for dynamic updating and made easy to update. I'm not sure the keymap name is the most useful indicator for the vi mode. local keymaps are not going to be indicated and keymaps like menuselect have a longer name. Subtler indicators like cursor shape/colour or something like the readline feature are perhaps more useful. In vim, I would never read the '-- INSERT --' indicator: it is a blob that appears in peripheral vision. I should mention that I'm all for making this simpler to configure. Oliver