Document keys recognized in insert and prompt mode
This commit is contained in:
parent
1bf0a964ce
commit
929c209c01
|
@ -215,9 +215,30 @@ Insert Mode
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
|
|
||||||
When entering insert mode, keys are now directly inserted before each selections
|
When entering insert mode, keys are now directly inserted before each selections
|
||||||
cursor. A few additional keys are supported, like arrow keys to move around, however
|
cursor. Some additional keys are recognized in insert mode:
|
||||||
their use is not encouraged. You can go back to normal mode by pressing the `<esc>`
|
|
||||||
key.
|
* `<esc>`: leave insert mode
|
||||||
|
* `<backspace>`: delete characters before cursors
|
||||||
|
* `<del>`: delete characters under cursors
|
||||||
|
* `<left>, <right>, <up>, <down>`: move the cursors in given direction
|
||||||
|
* `<home>`: move cursors to line begin
|
||||||
|
* `<end>`: move cursors to end of line
|
||||||
|
|
||||||
|
* `<c-n>`: select next completion candidate
|
||||||
|
* `<c-p>`: select previous completion candidate
|
||||||
|
* `<c-x>`: explicit insert completion query, followed by:
|
||||||
|
- `f`: explicit file completion
|
||||||
|
- `w`: explicit word completion
|
||||||
|
- `l`: explicit line completion
|
||||||
|
* `<c-o>`: disable automatic completion for this insert session
|
||||||
|
|
||||||
|
* `<c-r>`: insert contents of the register given by next key
|
||||||
|
* `<c-v>`: insert next keystroke directly into the buffer,
|
||||||
|
without interpretting it.
|
||||||
|
|
||||||
|
* `<c-u>`: commit changes up to now as a single undo group.
|
||||||
|
|
||||||
|
* `<a-;>`: escape to normal mode for a single command
|
||||||
|
|
||||||
Movement
|
Movement
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
|
@ -486,9 +507,41 @@ Commands
|
||||||
When pressing `:` in normal mode, Kakoune will open a prompt to enter a command.
|
When pressing `:` in normal mode, Kakoune will open a prompt to enter a command.
|
||||||
|
|
||||||
Commands are used for non editing tasks, such as opening a buffer, writing the
|
Commands are used for non editing tasks, such as opening a buffer, writing the
|
||||||
current one, quitting, etc. You can cycle through the command history with
|
current one, quitting, etc.
|
||||||
`<c-p>` and `<c-n>`. Commands starting with horizontal whitespace (e.g. a
|
|
||||||
space) will not be saved in the command history.
|
A few keys are recognized by prompt mode to help editing a command:
|
||||||
|
|
||||||
|
* `<ret>`: validate prompt
|
||||||
|
* `<esc>`: abandon without
|
||||||
|
|
||||||
|
* `<left> or <a-h>`: move cursor to previous character
|
||||||
|
* `<right> or <a-l>`: move cursor to previous character
|
||||||
|
* `<home>`: move cursor to first character
|
||||||
|
* `<end>`: move cursor to passed last character
|
||||||
|
* `<backspace> or <a-x>`: erase character before cursor
|
||||||
|
* `<del> or <a-d>`: erase character under cursor
|
||||||
|
|
||||||
|
* `<c-w>`: avance to next word begin
|
||||||
|
* `<c-a-w>`: advance to next WORD begin
|
||||||
|
* `<c-b>`: go back to previous word begin
|
||||||
|
* `<c-a-b>`: go back to previous WORD begin
|
||||||
|
* `<c-e>`: advance to next word end
|
||||||
|
* `<c-a-e>`: advance to next word end
|
||||||
|
|
||||||
|
* `<up> or <c-p>`: select previous entry in history
|
||||||
|
* `<down> or <c-n>`: select next entry in history
|
||||||
|
|
||||||
|
* `<tab>`: select next completion candidate
|
||||||
|
* `<backtab>`: select previous completion candidate
|
||||||
|
|
||||||
|
* `<c-r>`: insert then content of the register given by next key.
|
||||||
|
* `<c-v>`: insert next keystroke without interpretting it
|
||||||
|
|
||||||
|
* `<c-o>`: disable auto completion for this prompt
|
||||||
|
|
||||||
|
|
||||||
|
Commands starting with horizontal whitespace (e.g. a space) will not be
|
||||||
|
saved in the command history.
|
||||||
|
|
||||||
Basic Commands
|
Basic Commands
|
||||||
~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~
|
||||||
|
@ -929,7 +982,6 @@ using *control-x*, followed, by:
|
||||||
* *f* : filename completion
|
* *f* : filename completion
|
||||||
* *w* : buffer word completion
|
* *w* : buffer word completion
|
||||||
* *l* : buffer line completion
|
* *l* : buffer line completion
|
||||||
* *o* : option based completion
|
|
||||||
|
|
||||||
Completion candidates can be selected using `ctrl-n` and `ctrl-p`.
|
Completion candidates can be selected using `ctrl-n` and `ctrl-p`.
|
||||||
|
|
||||||
|
@ -1198,9 +1250,9 @@ Key Mapping
|
||||||
|
|
||||||
You can redefine a key's meaning using the map command
|
You can redefine a key's meaning using the map command
|
||||||
|
|
||||||
------------------------------------------------------
|
--------------------------------
|
||||||
:map <scope> <mode> <key> <keys>
|
:map <scope> <mode> <key> <keys>
|
||||||
------------------------------------------------------
|
--------------------------------
|
||||||
|
|
||||||
with `scope` being one of `global`, `buffer` or `window` (or any prefix),
|
with `scope` being one of `global`, `buffer` or `window` (or any prefix),
|
||||||
mode being `insert`, `normal`, `prompt`, `menu` or `user` (or any prefix), `key` being
|
mode being `insert`, `normal`, `prompt`, `menu` or `user` (or any prefix), `key` being
|
||||||
|
|
Loading…
Reference in New Issue
Block a user