Tuesday, November 2, 2010

Re: Using Bash in Vi mode. How to map keys?

Reply to message «Re: Using Bash in Vi mode. How to map keys?»,
sent 19:57:06 02 November 2010, Tuesday
by aleCodd:

> just for curiosity, why do you have in the last 5 or so commands the
> <c-/>,
> why is not the <c-o> enough to enter a normal mode command before
> returning
> to insert mode..
Because it moves one character left at the end of line and does not move
anything in the middle.
<unquote>

what do you mean by that? <c-o> waits for a command and reenters insert
mode, but where does it MOVE?


>> and just to make sure, bindkey is a zsh command, and if so how do you
>> rate
>> zsh vs. bash when it comes to command line editing, which is more vi-like
>> configurable?
> While you are using zsh, you can configure almost anything. I do not know
> how to
> bind a key to a custom function that does something with the command line,
> but I
> do not say that this is impossible: I switched to zsh when I had three
> aliases,
> two binds and no functions in my bashrc, so I do not have enough
> experience in
> configuring bash. In zsh I do not use normal/insert modes, but have some
> vim-
> like keybindings: <C-o> that can execute some commands in «normal» mode,
> <C-r>*,
> a bunch of «,*» mappings. If you want to compare, try asking on
> stackoverflow
> how to imitate vim's <C-o> in bash while having a emacs keys, based on
> those
> answers I could yield more useful comparison.
>
> I also know, that in zsh you may setup as many modes as you want: that
> indicator
> was based onto the fact that zsh was changing its keymap when moving
> between
> vicmd/viins, so it is not something hard-coded like in bash.
>
> In some recent topics discussed on zsh mailing list there was an
> experimental
> implementation of dynamic higlighting (though it was capable almost only
> for
> higlighting command as alias/command/builtin/function). Can you imagine
> something like that implemented without patching in bash?
> <unquote>
> really appreciate your detailed explanation, so i guess immigrating to
> zsh land will make things easier in the end, too bad that it will take
> another month or so to get used to it with all its commands etc.
>

--
View this message in context: http://vim.1045645.n5.nabble.com/Using-Bash-in-Vi-mode-How-to-map-keys-tp3245193p3247177.html
Sent from the Vim - General mailing list archive at Nabble.com.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: