zsh-users
 help / color / mirror / code / Atom feed
From: darwin <darwinskernel@gmail.com>
To: zsh-users@zsh.org
Subject: *don't* fail when bck-i-search is over
Date: Mon, 22 Nov 2010 11:34:47 -0500	[thread overview]
Message-ID: <20101122163447.GA2658@WALL-E> (raw)

hello,

i've this in .zshrc

zle-line-init(){
	zle history-incremental-search-backward }
	#zle -K vicmd;}
zle -N zle-line-init
bindkey -M isearch "^I" vi-repeat-search
# bindkey -M isearch "^I" history-incremental-search-forward

1. it _almost_ does what i want it to do which is to start off on bck-i-search. the idea is that with cli as the main interface, user have issued his most commonly used commands already and so it makes more sense to look into .histfile (or whereever) first. as a result the system is now screaming. well, it's all great util user wants to issue a never-issued-before command. one way to do this is to get out of bck-i-search and do it there (viins, vicmd, what have you). but a more elegent solution, i think, is to have shell start digging the $PATH for possible completions once it's done with the .histfile. that way performance wouldn't be comprimised and user is still doing the same thing (keep begging the tab) to get to where he wants to go. is there a way to do that? 

2. the commented lines are what i had before. with all my _elegant_ solutions there are still situations when i would still want to edit a command and that's when i would prefer to go back to vicmd (it's a matter of muscle mm really). but with my current setting:
	bindkey -M isearch '^[' send-break
hitting esc gets me out of bck-i-search and dumps me into emacs! i even tried with
	bindkey -v
but that's half-baked because i esc bck-i-search into viins and not vicmd. i would appreciate any help with this one also and thanks in advance.


             reply	other threads:[~2010-11-22 16:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-22 16:34 darwin [this message]
2010-11-23  8:12 ` Bart Schaefer
     [not found]   ` <20101123214048.GA8029@WALL-E>
2010-11-23 21:46     ` darwin
2010-11-24  8:24     ` Bart Schaefer

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=20101122163447.GA2658@WALL-E \
    --to=darwinskernel@gmail.com \
    --cc=zsh-users@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).