<root> / doc / emacscommandline.txt (5a677969d895fac61978075dda18d3577ea9e794) (3,221B) (mode 100644) [raw]
*emacscommandline.txt*  Emacs- (or Bash-) style mappings for command-line mode

Author:  Houtsnip <NstraigOhttreedSitcPh-githuAb@yahMoo.co.uk>
                                                *emacscommandline-author*
License: Same terms as Vim itself (see |license|)

INTRODUCTION                                    *emacscommandline*

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.

MOVEMENT                                        *emacscommandline-movement*

*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

DELETION                                        *emacscommandline-deletion*

*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

HISTORY                                         *emacscommandline-history*

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

OTHER                                           *emacscommandline-other*

*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
                 registry 'c'.
*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)

OLD KEYS                                        *emacscommandline-old-keys*

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
instead CTRL-O_CTRL-F.

*WARNING*

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.

 vim:tw=78:et:ft=help:norl:
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vim-emacscommandline

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vim-emacscommandline

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master