diff --git a/doc_src/index.hdr.in b/doc_src/index.hdr.in index c1f7178ea..0b2a23c75 100644 --- a/doc_src/index.hdr.in +++ b/doc_src/index.hdr.in @@ -1058,12 +1058,16 @@ Command mode is also known as normal mode. - @key{Control, X} copies the current buffer to the system's clipboard, @key{Control, V} inserts the clipboard contents. - @key{Control,C} deletes the entire line. +- @key{Backspace} moves the cursor left. + \subsubsection vi-mode-insert Insert mode - @key{Escape} or @key{Control,C} enters command mode. - @key{Control,x} moves the cursor to the end of the line. If an autosuggestion is available, it will be accepted completely. +- @key{Backspace} removes one character to the left. + \subsubsection vi-mode-visual Visual mode - @cursor_key{←,Left} and @cursor_key{→,Right} extend the selection backward/forward by one character. diff --git a/share/functions/fish_vi_key_bindings.fish b/share/functions/fish_vi_key_bindings.fish index fa77c3609..28231ed9f 100644 --- a/share/functions/fish_vi_key_bindings.fish +++ b/share/functions/fish_vi_key_bindings.fish @@ -97,8 +97,11 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish' bind -k dc delete-char - bind -k backspace backward-delete-char - bind \x7f backward-delete-char + # Backspace deletes a char in insert mode, but not in normal/default mode. + bind -M insert -k backspace backward-delete-char + bind -M default -k backspace backward-char + bind -M insert \x7f backward-delete-char + bind -M default \x7f backward-char bind \e\[3\;2~ backward-delete-char # Mavericks Terminal.app shift-delete bind dd kill-whole-line