zsh-users
 help / color / mirror / code / Atom feed
* lauching editor on command line input
@ 1997-01-08  3:21 Matthew Braun
  1997-01-08  9:07 ` Zefram
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Braun @ 1997-01-08  3:21 UTC (permalink / raw)
  To: zsh-users

Say I'm using command history (ie. up arrow in emacs mode) to go back to
a multi-line command (like a for loop), is there way to setup a
keystroke to launch an editor (ie. vi/emacs) on the current command
line.  Kind of like you can do with 'fc -e vi' to edit the last command
that was run?

Also, is there a way to avoid the command being run (and instead put you
back to the zle command line input mode) when you exit the editor from
running the 'fc -e' command.

Thanks for any info...

Matthew.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: lauching editor on command line input
  1997-01-08  3:21 lauching editor on command line input Matthew Braun
@ 1997-01-08  9:07 ` Zefram
  0 siblings, 0 replies; 2+ messages in thread
From: Zefram @ 1997-01-08  9:07 UTC (permalink / raw)
  To: Matthew Braun; +Cc: zsh-users

Something like this should work:

bindkey -a "^A^A" beginning-of-buffer-or-history
bindkey -a "^A^E" end-of-buffer-or-history
bindkey -a "^A'" quote-line
bindkey -as some_key_sequence "^A'^A^AIprint -r -- ^[^A^EA > /tmp/z\$\$;vi /tmp/z\$\$;print -z -- \$(< /tmp/z\$\$)^M"

This is untested.

-zefram


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-01-08  9:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-01-08  3:21 lauching editor on command line input Matthew Braun
1997-01-08  9:07 ` Zefram

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).