> 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.
I've got similar mappings for the same reason. I'm currently
experimenting with some additional mappings to avoid losing any
Vim functionality. Since CTRL-G and CTRL-O do nothing at
present in command-line mode, I use CTRL-G as a replacement for
the lost command-line history editing feature that lives by
default at CTRL-F, and I use CTRL-O as a prefix meaning
"Original" or "Old", so that I can use all of the original
functionality with the original keys:
" Replace lost command-line history edit binding:
cnoremap <C-G> <C-F>
" Make all replaced keys accessible with CTRL-O prefix:
cnoremap <C-O><C-A> <C-A>
cnoremap <C-O><C-B> <C-B>
cnoremap <C-O><C-D> <C-D>
cnoremap <C-O><C-F> <C-F>
cnoremap <C-O><C-N> <C-N>
cnoremap <C-O><C-P> <C-P>
These go along with the bindings for Emacs-style command-line
editing:
" Emacs-style command-line editing mappings:
cnoremap <C-A> <Home>
cnoremap <C-B> <Left>
cnoremap <C-D> <Del>
cnoremap <C-F> <Right>
cnoremap <C-N> <Down>
cnoremap <C-P> <Up>
" If Alt-key mappings work for your system:
cnoremap <M-b> <S-Left>
cnoremap <M-f> <S-Right>
Michael Henry
--
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:
Post a Comment