aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src/index.hdr.in
diff options
context:
space:
mode:
authorGravatar David Xia <david@davidxia.com>2014-07-15 20:30:17 -0400
committerGravatar David Xia <david@davidxia.com>2014-07-15 21:29:02 -0400
commite84a762171ce23a3367c4eed699049c958a66b81 (patch)
tree262a8b6418d7246755d3bcca277d31acb8d8701c /doc_src/index.hdr.in
parent62d86b3d18feb24f93d615cfadfe1fbad86ef118 (diff)
Add docs for vi mode
fixes #1536
Diffstat (limited to 'doc_src/index.hdr.in')
-rw-r--r--doc_src/index.hdr.in24
1 files changed, 23 insertions, 1 deletions
diff --git a/doc_src/index.hdr.in b/doc_src/index.hdr.in
index cb24bcf0..b44e382e 100644
--- a/doc_src/index.hdr.in
+++ b/doc_src/index.hdr.in
@@ -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