On 2010-07-09, Tony Mechelynck wrote:
> On 09/07/10 06:22, Gary Johnson wrote:
> [...]
> >Instead of Ctrl-F, I use<Esc>, which I find myself hitting
> >automatically when I want to edit the command line anyway. You can
> >enable the use of<Esc> by putting this line in your _vimrc:
>
> Hm., I find myself automatically hitting <Esc> when I want to abort what
> I was doing on the command-line and go back to Normal mode.
I use vi-mode at the shell prompt and I've used the shell for a long
time, so a lot of my finger habits come from that. When I want to
edit something I've typed on the shell command line, I immediately
reach for <Esc>.
> >
> > set cedit=<Esc>
> >
> >You might also be interested in
> >
> > :help emacs-keys
> >
> >While the emacs key bindings aren't as immediately natural as vi key
> >bindings, they are easier to use and offer more functions than the
> >arrow keys.
>
> After looking at that help paragraph, I find that IMHO the {rhs} keys
> (mostly the arrow keys) are both easier and more natural to use. In most
> cases they require only one key (or, in two cases, Shift + one key)
> rather than the complex and hard to remember Emacs Ctrl+letter -- which,
> in addition, hide _other_ useful Vim commands:
I can reach the Ctrl key easily with my fingers on the home row,
whereas I have to look at the keyboard to find the arrow keys, then
move my right hand a fair distance to use them.
> Key Emacs ({rhs}) Vim
> Ctrl-A <Home> insert all names matching pattern
I have never used that Vim function. I seldom expand patterns, even
at the shell prompt. But it's true that I've lost that function.
> Ctrl-B <Left> <Home>
Ctrl-A now does <Home>.
> Ctrl-D <Del> list all names matching pattern
I have that bound to <Tab>, again to reflect shell usage.
> Ctrl-E <End> <End>
> Ctrl-F <Right> open cmdline window
Bound to <Esc>, as discussed above.
> Ctrl-N <Down> next (wildchar match or in history)
> Ctrl-P <Up> previous (ditto)
I have that, too. That is, if nothing in on the Vim command line,
Ctrl-N and Ctrl-P simply scroll through history. If I have
something already typed on the command line, those keys scroll
though items in the history that begin with what I've already typed.
> At least four of these are keystrokes I use fairly often on the command
> line, and a fifth one is unneeded (already standard).
Except for Ctrl-A, I have access to the same functions, just bound
to different, yet consistent, keys.
> Well, other people other mores I suppose; but trying to make Vim behave
> like Emacs... 'nuff said.
I have no desire to make Vim behave like emacs, but other programs I
use, notably mutt, use emacs key bindings to edit their command
lines, so making Vim behave the same makes my environment generally
more consistent.
Best regards,
Gary
--
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