mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
parent
62d86b3d18
commit
e84a762171
1 changed files with 23 additions and 1 deletions
|
@ -1120,7 +1120,11 @@ The \c fish editor features copy and paste, a searchable history and
|
|||
many editor functions that can be bound to special keyboard
|
||||
shortcuts.
|
||||
|
||||
Here are some of the commands available in the editor:
|
||||
Similar to bash, fish has Emacs and vi editing modes. The default
|
||||
editing mode is Emacs. You can switch to vi mode with \c fish_vi_key_bindings
|
||||
and switch back with \c fish_default_key_bindings.
|
||||
|
||||
\subsection Emacs mode commands
|
||||
|
||||
- Tab <a href="#completion">completes</a> the current token.
|
||||
- Home or Ctrl-A moves the cursor to the beginning of the line.
|
||||
|
@ -1147,6 +1151,24 @@ Here are some of the commands available in the editor:
|
|||
You can change these key bindings using the
|
||||
<a href="commands.html#bind">bind</a> builtin command.
|
||||
|
||||
\subsection Vi mode commands
|
||||
|
||||
Vi mode allows for the use of Vi-like commands when at the bash prompt.
|
||||
You'll initially be in insert mode. Hitting the escape key takes you
|
||||
into command mode where you can use, but aren't limited to, the following.
|
||||
|
||||
- h moves cursor left
|
||||
- l moves cursor right
|
||||
- A moves cursor to end of line and put in insert mode
|
||||
- 0 (zero) Move cursor to beginning of line (doesn't put in insert mode)
|
||||
- i put into insert mode at current position
|
||||
- a put into insert mode after current position
|
||||
- dd Delete line (saved for pasting)
|
||||
- D delete text after current cursor position (saved for pasting)
|
||||
- p paste text that was deleted
|
||||
- u undo
|
||||
- etc for many of the other Vi commands
|
||||
|
||||
\subsection killring Copy and paste (Kill Ring)
|
||||
|
||||
\c fish uses an Emacs style kill ring for copy and paste
|
||||
|
|
Loading…
Reference in a new issue