zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Cc: Robin Lee Powell <rlpowell@digitalkingdom.org>
Subject: Re: end-of-line not working as advertised?
Date: Sat, 22 Aug 2015 13:16:09 -0700	[thread overview]
Message-ID: <150822131609.ZM31158@torch.brasslantern.com> (raw)
In-Reply-To: <20150822051424.GB22026@stodi.digitalkingdom.org>

On Aug 21, 10:14pm, Robin Lee Powell wrote:
}
} That is *SUPER* helpful!  Thank you so much.

This is actually a better way, I think:

vi-next-end-of-line() {
  # In vicmd mode, CURSOR can never be at EOL, and in fact can't
  # be closer than 2 positions to the left of EOL, because the
  # on-screen visible cursor is always one place to the right of
  # the value of CURSOR and never "over" the newline itself.
  if [[ $KEYMAP = vicmd ]]; then
    (( CURSOR++ ))
  fi
  if [[ $BUFFER[CURSOR+1] = $'\n' ]]; then
    NUMERIC=2
  fi
  zle vi-end-of-line	
}


      reply	other threads:[~2015-08-22 20:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-20 19:36 Robin Lee Powell
2015-08-21  0:48 ` Vincent Lefevre
2015-08-21  1:25 ` Bart Schaefer
2015-08-21  5:29   ` Robin Lee Powell
2015-08-21  6:39     ` Bart Schaefer
2015-08-21  7:07       ` Bart Schaefer
2015-08-22  5:14         ` Robin Lee Powell
2015-08-22 20:16           ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=150822131609.ZM31158@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=rlpowell@digitalkingdom.org \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).