From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18184 invoked by alias); 9 Dec 2016 15:48:17 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22168 Received: (qmail 29827 invoked from network); 9 Dec 2016 15:48:17 -0000 X-Qmail-Scanner-Diagnostics: from 256bit.org by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(144.76.87.176):SA:0(-3.0/5.0):. Processed in 0.806812 secs); 09 Dec 2016 15:48:17 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=RP_MATCHES_RCVD,SPF_HELO_PASS, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: cb@256bit.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at 256bit.org designates 144.76.87.176 as permitted sender) Date: Fri, 9 Dec 2016 16:48:13 +0100 From: Christian Brabandt To: Oliver Kiddle Cc: zsh-users@zsh.org Subject: Re: vi mode reset Message-ID: <20161209154813.GG19559@256bit.org> References: <20161209122958.GD19559@256bit.org> <57127.1481294647@hydra.kiddle.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <57127.1481294647@hydra.kiddle.eu> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: cb@256bit.org X-SA-Exim-Scanned: No (on 256bit.org); SAEximRunCond expanded to false Hi Oliver! On Fr, 09 Dez 2016, Oliver Kiddle wrote: > Christian Brabandt wrote: > > However, since the upgrade I noticed that my zsh resets vi mode, on > > various occasions, but I cannot reproduce exactly when exactly this > > What exactly do you mean by "resets vi mode". Switches to command/normal > mode without your having pressed escape, perhaps? Many key combinations > send a sequence of characters starting with an escape so zsh may be > mis-interpreting that. It is reset to emacs mode I believe. I have to hit set -o vi again. > > happens. I think this usually happens either if I am pasting something > > into the terminal (using putty from Windows and pasting using > > keys) or running Vim. > > Sounds like possibly an effect of the bracketed paste feature. You can > disable that with: unset zle_bracketed_paste I'll try that, thanks. However I always thought, bracket paste mode is useful... > It'd be better to understand how it is coming to fail for you. Perhaps > your terminal has a different bracketed paste mode. Or perhaps you've > removed the key binding for it. Do you perhaps clear a range of key > bindings in your .zshrc? What does this show?: > bindkey -L |grep 200 > > What do you see if you press Ctrl-V before pasting text? > > Do you perhaps have some other safe-paste or bracketed-paste plugin from > elsewhere. Are you using something like oh-my-zsh or prezto? I don't use any distribution. Here is an example: 0 59928 chrisbra@debian ~ % bindkey -L |grep 200 bindkey "^X^[[200~" _start_quoted_paste bindkey "^[[200~" _start_paste # Here I pasted the string zsh using Ctrl-V: 0 59929 chrisbra@debian ~ % ^[[200~zshG # Here I pasted the usual way hitting , then pressing # stops working: 1 59929 chrisbra@debian ~ % wget -c 'https://github.com/vim/vim/issues/1204' --2016-12-09 14:14:10-- https://github.com/vim/vim/issues/1204 Resolving github.com (github.com)... 192.30.253.113, 192.30.253.112 [...] 2016-12-09 14:14:12 (284 KB/s) - ‘1204’ saved [76470] # Now hitting esc won't go back into command mode. 2 59933 chrisbra@debian ~ % set -o |grep "^vi" vi on # Looks like it is still on. Hm, that is strange. However when I press # it won't go back into normal mode but keeps entering keys. # Entering set -o vi fixes that. Best, Christian -- Linux wird nie das meistinstallierte Betriebssystem sein. Bedenken Sie nur, wie oft man Windows neu installieren muß.