From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,MALFORMED_FREEMAIL, RCVD_IN_DNSWL_NONE autolearn=no autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 6fc8fe28 for ; Sat, 13 Jul 2019 09:25:17 +0000 (UTC) Received: (qmail 19839 invoked by alias); 13 Jul 2019 09:25:11 -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: List-Unsubscribe: X-Seq: 24055 Received: (qmail 11455 invoked by uid 1010); 13 Jul 2019 09:25:10 -0000 X-Qmail-Scanner-Diagnostics: from park01.gkg.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25503. spamassassin: 3.4.2. Clear:RC:0(205.235.26.22):SA:0(-0.3/5.0):. Processed in 2.167536 secs); 13 Jul 2019 09:25:10 -0000 X-Envelope-From: SRS0=WFBN=VK=yahoo.co.uk=okiddle@bounces.park01.gkg.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at bounces.park01.gkg.net designates 205.235.26.22 as permitted sender) X-Virus-Scanned: by amavisd-new at gkg.net Authentication-Results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1563009871; bh=jysWvCkAMjr11BfNTw44hfK8i0pBLjxO07Fid70drRU=; h=From:References:To:Sub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7rcc09rXCmmn0teh6xC aTX0rVKnjjZ.epEFEvosM9xlnk0LyiJg5Xzn0yvqTBMhpYIQt7aykaHlATwjpUpMuPQQ283kaVE7 moi.P5uRlPHUVabCJtyHzdmOCkH71nnq4FbrUAnZg5n.AqIDXbguMW9UriWeoHAh6jNSRXCyqvvd hL.ICt6etN8p8BKbWKzVafCQE0GSf8F_bTojKOc4zZUQT8.HAJJIu00Jk8mmWBFpEVv4Z7B2ikfA PwiOwMm8WEM2bxo24ergzeGc3n_JWV3vVHGd5yfyGfMvVLJYfrWwGjDeTpw8LQMgNGGzOmGlmufv Tne1RjrBxUvf8KWVRT_5MoSGAYtpKI9CrxuBGsw2ZslSatLqgn0ahLdoUU5M_xxPaLIix80KTCdl B5FRm8hfPaeMZHAjKTlcqnaCaog_iqoyHdq6aIPbG0qyPJdLUk0avS4IG6eQVvbaYuPf.cz7zUUd GR3SycQgxtxwxG565zeIvOscfBXr9CEei0Q-- cc: "zsh-users@zsh.org" In-reply-to: From: Oliver Kiddle References: To: Christopher Paul Subject: Re: vi mode cursor position MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <41959.1563009868.1@hydra> Content-Transfer-Encoding: quoted-printable Date: Sat, 13 Jul 2019 11:24:28 +0200 Message-ID: <41960-1563009868.475157@HUWd.vdv5.55oG> Christopher Paul wrote: > Salutations Zsh Users, > > I just started using zsh. It's always fun to learn a new trick. I am a l= ong-time vi-mode user. One thing that's different from ksh and bash is the= cursor position after an ESC-k. With zsh, the cursor is positioned on the= last character of the last command after an ESC-k. With ksh and bash, the= cursor is positioned at the first character of the last command after an = ESC-k. > > I'm pretty sure there is a way to change this in zsh. Can anyone give me= a pointer? By default, k is bound to up-line-or-history. There are alternatives that differ in terms of the cursor position. For example: bindkey -a k history-beginning-search-backward However that may break other things like moving the cursor in a multi-line buffer so you may want to use a custom widget that does something like: if [[ $LBUFFER =3D=3D *$'\n'* ]]; then zle .up-line else zle .history-beginning-search-backward fi Oliver