zsh-users
 help / color / mirror / code / Atom feed
* Re: vi mode, v launches editor
@ 2008-10-24 12:24 Jerry Rocteur
  2008-10-24 12:33 ` Mikael Magnusson
  2008-10-24 13:02 ` Peter Stephenson
  0 siblings, 2 replies; 7+ messages in thread
From: Jerry Rocteur @ 2008-10-24 12:24 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-users

> On Fri, 24 Oct 2008 11:35:17 +0200 (CEST)
> "Jerry Rocteur" <macosx@rocteur.cc> wrote:
> w> 1) How do I get a complete list of key bindings that are set up in my current shell,
>> perhaps if I could find this I
>> would be able to find an answer quickly
>
> You might want to use "bindkey -L" since it outputs it in the form of the command you need to set things up again,
so it's easy to grab a command for future use.

That's a bit low level, I never type control anything except for control C from time to time or control H whey I
forget to set stty erase on a HP UX server ;-)

What I had in mind was, when I'm on the command line and I want to go right I type l, if I want to delete to end of
line I type D, that is the kind of list I thought would be useful ?

>> 2) When in vi mode and editing a line and I would like to load the whole line in vi, in ksh I'm used to typing v on
>> the line and this loads vi with the complete line in it. With zsh nothing happens, I'm sure this is again something
>> set up in the bindings but I've just scanned through them and can't find anything, I'm in vi mode and my EDITOR and
>> VISUAL settings are set.
>
> See the zshcontrib manual page: the function edit-command-line does what you want.  zshcontrib describes a whole
load of add ons that are implemented as shell functions so aren't part of the core zle stuff.
>
> autoload -Uz edit-command-line
> zle -N edit-command-line
> bindkey -M vicmd 'v' edit-command-line

GREAT, I'll try it immediately, and edit-command-line was the thing I was looking for but didn't find but now I know
that it would not have helped me.

> By the way, if you're confused about where to look in the manual, there's a new "zshroadmap" page that should give
some pointers.

OK. with zshcontrib and zshroadmap and the zsh-lovers page and the from bash to z shell web page guess what I'll be
doing this weekend.

>> P.S. I just got a mail from an agent looking for a build consultant and it is the first time I see ZSH mentioned as
the skills required!
> Wow, that's certainly a change.

I'm updating my CV ;-))))))))

Cheers,

Jerry




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

* Re: vi mode, v launches editor
  2008-10-24 12:24 vi mode, v launches editor Jerry Rocteur
@ 2008-10-24 12:33 ` Mikael Magnusson
  2008-10-24 13:02 ` Peter Stephenson
  1 sibling, 0 replies; 7+ messages in thread
From: Mikael Magnusson @ 2008-10-24 12:33 UTC (permalink / raw)
  To: Jerry Rocteur; +Cc: zsh-users

2008/10/24 Jerry Rocteur <macosx@rocteur.cc>:
>> On Fri, 24 Oct 2008 11:35:17 +0200 (CEST)
>> "Jerry Rocteur" <macosx@rocteur.cc> wrote:
>> w> 1) How do I get a complete list of key bindings that are set up in my current shell,
>>> perhaps if I could find this I
>>> would be able to find an answer quickly
>>
>> You might want to use "bindkey -L" since it outputs it in the form of the command you need to set things up again,
> so it's easy to grab a command for future use.
>
> That's a bit low level, I never type control anything except for control C from time to time or control H whey I
> forget to set stty erase on a HP UX server ;-)
>
> What I had in mind was, when I'm on the command line and I want to go right I type l, if I want to delete to end of
> line I type D, that is the kind of list I thought would be useful ?

try bindkey -M vicmd

-- 
Mikael Magnusson


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

* Re: vi mode, v launches editor
  2008-10-24 12:24 vi mode, v launches editor Jerry Rocteur
  2008-10-24 12:33 ` Mikael Magnusson
@ 2008-10-24 13:02 ` Peter Stephenson
  2008-10-24 16:31   ` @ Rocteur CC
  1 sibling, 1 reply; 7+ messages in thread
From: Peter Stephenson @ 2008-10-24 13:02 UTC (permalink / raw)
  To: zsh-users

"Jerry Rocteur" wrote:
> What I had in mind was, when I'm on the command line and I want to go right I
>  type l, if I want to delete to end of
> line I type D, that is the kind of list I thought would be useful ?

Have a look at the reference card at our book's web site:

http://www.bash2zsh.com/zsh_refcard/refcard.pdf

There's a summary on pages 13 and 14.  It's very terse, but it will tell
you what's bound by default in the vicmd and viins keymaps, so should
help.

Have a look at the book too :-).

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


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

* Re: vi mode, v launches editor
  2008-10-24 13:02 ` Peter Stephenson
@ 2008-10-24 16:31   ` @ Rocteur CC
  0 siblings, 0 replies; 7+ messages in thread
From: @ Rocteur CC @ 2008-10-24 16:31 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-users

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]


On 24 Oct 2008, at 15:02, Peter Stephenson wrote:

> "Jerry Rocteur" wrote:
>> What I had in mind was, when I'm on the command line and I want to  
>> go right I
>>  type l, if I want to delete to end of
>> line I type D, that is the kind of list I thought would be useful ?
>
> Have a look at the reference card at our book's web site:
>
> http://www.bash2zsh.com/zsh_refcard/refcard.pdf
>
> There's a summary on pages 13 and 14.  It's very terse, but it will  
> tell
> you what's bound by default in the vicmd and viins keymaps, so should
> help.
>
> Have a look at the book too :-).
>

Thanks for all that..

Funny you should say that, I ordered the book earlier this  
afternoon!! Unfortunately my usual store does not have it in stock  
and so I have to wait until they get it in stock. I look forward to  
reading it.

Have a GREAT weekend,

Jerry

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2417 bytes --]

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

* Re: vi mode, v launches editor
  2008-10-24  9:35 Jerry Rocteur
  2008-10-24 10:16 ` Thomas Köhler
@ 2008-10-24 10:33 ` Peter Stephenson
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Stephenson @ 2008-10-24 10:33 UTC (permalink / raw)
  To: zsh-users

On Fri, 24 Oct 2008 11:35:17 +0200 (CEST)
"Jerry Rocteur" <macosx@rocteur.cc> wrote:
w> 1) How do I get a complete list of key bindings that are set up in my current shell,
> perhaps if I could find this I
> would be able to find an answer quickly

You might want to use "bindkey -L" since it outputs it in the form of the
command you need to set things up again, so it's easy to grab a command for
future use.

> 2) When in vi mode and editing a line and I would like to load the whole line in vi,
> in ksh I'm used to typing v on
> the line and this loads vi with the complete line in it. With zsh nothing happens,
> I'm sure this is again something
> set up in the bindings but I've just scanned through them and can't find anything,
> I'm in vi mode and my EDITOR and
> VISUAL settings are set.

See the zshcontrib manual page: the function edit-command-line does
what you want.  zshcontrib describes a whole load of add ons that are
implemented as shell functions so aren't part of the core zle stuff.

autoload -Uz edit-command-line
zle -N edit-command-line
bindkey -M vicmd 'v' edit-command-line

By the way, if you're confused about where to look in the manual, there's
a new "zshroadmap" page that should give some pointers.

> P.S. I just got a mail from an agent looking for a build consultant and
> it is the first time I see ZSH mentioned as the skills required!

Wow, that's certainly a change.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


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

* Re: vi mode, v launches editor
  2008-10-24  9:35 Jerry Rocteur
@ 2008-10-24 10:16 ` Thomas Köhler
  2008-10-24 10:33 ` Peter Stephenson
  1 sibling, 0 replies; 7+ messages in thread
From: Thomas Köhler @ 2008-10-24 10:16 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 1762 bytes --]

Hi,

Jerry Rocteur wrote:
> Hi,
> 
> I'm stuck once again.. I have problems knowing where to look for this kind of
> answer, I look at man zshoptions zshzle
> and search the mailing list but can't seem to find the right combination ..
> 
> 1) How do I get a complete list of key bindings that are set up
> in my current shell, perhaps if I could find this I would be
> able to find an answer quickly

bindkey

> 2) When in vi mode and editing a line and I would like to load
> the whole line in vi, in ksh I'm used to typing v on the line
> and this loads vi with the complete line in it. With zsh
> nothing happens, I'm sure this is again something set up in the
> bindings but I've just scanned through them and can't find
> anything, I'm in vi mode and my EDITOR and VISUAL settings are
> set.

I don't know whether this feature is there or not. Maybe you can
build a user-defined widget to do it, by writing $BUFFER to a
file, using $EDITOR on that file, then set the contents of the
file as the contents of $BUFFER? Of course, I didn't test that
now.

> Thanks in advance for help and feel free to send me links so I
> can RFM if the FM answers my questions, as I'm happy to learn
> myself, at the moment I'm trying to be as productive in zsh as
> I am in ksh and I'm also trying to earn a living programming
> and so I can't spend my whole days reading all the
> documentation available.

Of course, "man zshzle" would be helpful for all of this.

Ciao,
Thomas

-- 
 Thomas Köhler       Email:       jean-luc@picard.franken.de
     <><             WWW:              http://gott-gehabt.de
                     IRC:                           tkoehler
                     PGP public key available from Homepage!

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* vi mode, v launches editor
@ 2008-10-24  9:35 Jerry Rocteur
  2008-10-24 10:16 ` Thomas Köhler
  2008-10-24 10:33 ` Peter Stephenson
  0 siblings, 2 replies; 7+ messages in thread
From: Jerry Rocteur @ 2008-10-24  9:35 UTC (permalink / raw)
  To: zsh-users

Hi,

I'm stuck once again.. I have problems knowing where to look for this kind of
answer, I look at man zshoptions zshzle
and search the mailing list but can't seem to find the right combination ..

1) How do I get a complete list of key bindings that are set up in my current shell,
perhaps if I could find this I
would be able to find an answer quickly

2) When in vi mode and editing a line and I would like to load the whole line in vi,
in ksh I'm used to typing v on
the line and this loads vi with the complete line in it. With zsh nothing happens,
I'm sure this is again something
set up in the bindings but I've just scanned through them and can't find anything,
I'm in vi mode and my EDITOR and
VISUAL settings are set.

Thanks in advance for help and feel free to send me links so I can RFM if the FM
answers my questions, as I'm happy to
learn myself, at the moment I'm trying to be as productive in zsh as I am in ksh and
I'm also trying to earn a living
programming and so I can't spend my whole days reading all the documentation available.

Regards,

Jerry
P.S. I just got a mail from an agent looking for a build consultant and it is the
first time I see ZSH mentioned as
the skills required!



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

end of thread, other threads:[~2008-10-24 17:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-24 12:24 vi mode, v launches editor Jerry Rocteur
2008-10-24 12:33 ` Mikael Magnusson
2008-10-24 13:02 ` Peter Stephenson
2008-10-24 16:31   ` @ Rocteur CC
  -- strict thread matches above, loose matches on Subject: below --
2008-10-24  9:35 Jerry Rocteur
2008-10-24 10:16 ` Thomas Köhler
2008-10-24 10:33 ` Peter Stephenson

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