From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27259 invoked by alias); 15 Feb 2011 15:45:09 -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: 15803 Received: (qmail 29668 invoked from network); 15 Feb 2011 15:45:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <110215074453.ZM31765@torch.brasslantern.com> Date: Tue, 15 Feb 2011 07:44:53 -0800 In-reply-to: Comments: In reply to Thorsten Kampe "Key bindings not working under screen" (Feb 15, 11:55am) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: Key bindings not working under screen MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Feb 15, 11:55am, Thorsten Kampe wrote: } } On systems where JED is not installed (-> DEFAULT_EDITOR=vim) I can } observe this: } } % bindkey | wc -l } 147 } % bindkey | grep copy-prev-shell-word } "^[-" copy-prev-shell-word } % screen } % bindkey | wc -l } 131 } % bindkey | grep copy-prev-shell-word } % } } I've renamed my .screenrc but the issue remains. Interestingly it only } happens when I set $EDITOR *and* $VISUAL in .zshrc, only under screen } and only with zsh (not bash). } } Can someone shed some light about the connection between $EDITOR, } $VISUAL, zsh and screen? Zsh attempts to initialize the ZLE mode based on VISUAL if it is set and EDITOR if it VISUAL is not. If whichever of those is chosen looks like a variant of "vi" then ZLE initializes with vi-style key bindings, otherwise it initializes with emacs-style key bindings. Probably what's happening is that when you log in, VISUAL and EDITOR are not set, and ZLE initializes in emacs mode. When you then start screen, those variables are in the environment and ZLE initializes in vi mode. I further suspect that some of your bindkey settings are always ending up in the emacs keymap, even when ZLE is in vi mode. Have you tried capturing the bindkey output in a file in each case and diffing them?