emacscommandline : makes command-line mode behave more like the Unix command line
| script karma
Downloaded by 518
Comments, bugs, improvements
script versions (upload new version)
|This plugin makes the command-line mode behave more like the Unix command
line, by adding Emacs-style mappings (like in the Bash shell). Some of the
mappings just map existing vim commands, but the rest implement functionality
that is not available natively.
CTRL-A move cursor to beginning of line
CTRL-E move cursor to end of line (i.e the native vim behaviour:
see c_CTRL-E). Not actually a re-mapping, but noted here
anyway for completeness.
CTRL-B move cursor one character backwards
CTRL-F move cursor one character forwards (overwrites c_CTRL-F)
META-B move cursor one word backwards
META-F move cursor one word forwards
CTRL-D delete character under cursor
CTRL-K kill line (delete from character under cursor to end of line)
(overwrites insert digraph: see c_CTRL-K. This is a shame,
but personally I don't use this much in command-line mode.)
CTRL-U backwards kill line (delete backwards to beginning of line)
(i.e. the same behaviour as in Bash: unix-line-discard)
META-D delete word under cursor
META-Backspace delete word backwards
CTRL-W delete backwards to previous white-space character
(i.e. the same behaviour as in Bash: unix-word-rubout)
CTRL-P previous line in history (same as <Up>)
CTRL-N next line in history (same as <Down>)
META-R search history backwards
(It would be nice to use the mapping CTRL-R, but this is
already used for insert register: see c_CTRL-R.)
CTRL-Y paste (yank) last deleted text (overwrites c_CTRL-Y).
Note that in Emacs, 'yank' means 'paste', whereas in vim it
means 'copy'. The same text is also available in the
CTRL-_ undo last change (overwrites c_CTRL-_)
CTRL-X_CTRL-U " " "
CTRL-Z toggle command-line as external command (overwrites suspend
vim in the terminal)
The old functions are all mapped to the same combination prefixed by CTRL-O.
So for example, to open the command-line window (see c_CTRL-F), press
This plugin buggers up the expression register (i.e. c_CTRL-R_=). This is
a limitation of vim. I don't know how to switch these mappings off in the
expression register and I don't think it's possible. However I never use the
expression register except in mappings, so it doesn't affect me.
Click on the package to download.
ip used for rating: 184.108.40.206