diff options
author | Fabian Homborg <FHomborg@gmail.com> | 2015-10-28 13:18:27 +0100 |
---|---|---|
committer | Fabian Homborg <FHomborg@gmail.com> | 2015-10-28 13:18:27 +0100 |
commit | bb491742eae9712f057232da7ab8421f4ae334b0 (patch) | |
tree | 5bd95e63539db2671a208317baa7f67f016e5b31 | |
parent | 46fbfaaa83d4cf93ea44c8faf0f3f44c593f95e4 (diff) |
vi: Bind \cx to end-of-line in insert mode
This will also accept any autosuggestion completely.
-rw-r--r-- | doc_src/index.hdr.in | 2 | ||||
-rw-r--r-- | share/functions/fish_vi_key_bindings.fish | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/doc_src/index.hdr.in b/doc_src/index.hdr.in index fdd5162f..20d86696 100644 --- a/doc_src/index.hdr.in +++ b/doc_src/index.hdr.in @@ -958,6 +958,8 @@ Command mode is also known as normal mode. - @key{Control,B} and @key{Control,F} move the cursor one word left or right. If the cursor is already at the end of the line, and an autosuggestion is available, @key{Control,F} accepts the first word in the suggestion. +- @key{Control,x} moves the cursor to the end of the line. If an autosuggestion is available, it will be accepted completely. + \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 4162c61d..55375cde 100644 --- a/share/functions/fish_vi_key_bindings.fish +++ b/share/functions/fish_vi_key_bindings.fish @@ -163,7 +163,7 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish' ### Overrides # This is complete in vim - bind \cx end-of-line + bind -M insert \cx end-of-line bind -M insert \cf forward-word bind '"*p' "commandline -i ( xsel -p; echo )[1]" |