lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 50f01b0 3/3: Refine zsh keybindings


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 50f01b0 3/3: Refine zsh keybindings
Date: Sat, 15 Feb 2020 08:56:19 -0500 (EST)

branch: master
commit 50f01b00439791fd3230fdd056f28201860a5524
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Refine zsh keybindings
---
 gwc/.zshrc | 42 ++++++++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 20 deletions(-)

diff --git a/gwc/.zshrc b/gwc/.zshrc
index cd982a8..7c45450 100644
--- a/gwc/.zshrc
+++ b/gwc/.zshrc
@@ -51,27 +51,29 @@ export LESSCHARSET=utf-8
 # Use vim keybindings.
 bindkey -v
 
-# Replace the default vim keybinding, to reduce astonishment.
+# Replace the default vim Backspace binding:
 bindkey '^?' backward-delete-char # Backspace
-
-# This seems to be bound by default:
-# bindkey '\e[3~' delete-char    # Del
-# but bind these explicitly--see:
-#   https://lists.nongnu.org/archive/html/lmi/2019-10/msg00032.html
-bindkey '\e[H' beginning-of-line # Home
-bindkey '\e[F' end-of-line       # End
-bindkey '\e[1;5D' backward-word  # Ctrl-left
-bindkey '\e[1;5C' forward-word   # Ctrl-right
-bindkey '\e[1;3D' backward-word  # Alt-left
-bindkey '\e[1;3C' forward-word   # Alt-right
-
-# Bind those in the 'vicmd' keymap, too:
-bindkey -M vicmd '\e[H' beginning-of-line # Home
-bindkey -M vicmd '\e[F' end-of-line       # End
-bindkey -M vicmd '\e[1;5D' backward-word  # Ctrl-left
-bindkey -M vicmd '\e[1;5C' forward-word   # Ctrl-right
-bindkey -M vicmd '\e[1;3D' backward-word  # Alt-left
-bindkey -M vicmd '\e[1;3C' forward-word   # Alt-right
+# because it is astonishing that 'vi-backward-delete-char'
+# doesn't delete past the point where insert mode was entered;
+# and bind these explicitly--see:
+#   https://lists.nongnu.org/archive/html/lmi/2020-02/msg00008.html
+bindkey '\e[3~' delete-char       # Del
+bindkey '\e[H' beginning-of-line  # Home
+bindkey '\e[F' end-of-line        # End
+bindkey '\e[1;5D' backward-word   # Ctrl-left
+bindkey '\e[1;5C' forward-word    # Ctrl-right
+bindkey '\e[1;3D' backward-word   # Alt-left
+bindkey '\e[1;3C' forward-word    # Alt-right
+
+# Bind those all in the 'vicmd' keymap, too:
+bindkey -M vicmd '^?' backward-delete-char # Backspace
+bindkey -M vicmd '\e[3~' delete-char       # Del
+bindkey -M vicmd '\e[H' beginning-of-line  # Home
+bindkey -M vicmd '\e[F' end-of-line        # End
+bindkey -M vicmd '\e[1;5D' backward-word   # Ctrl-left
+bindkey -M vicmd '\e[1;5C' forward-word    # Ctrl-right
+bindkey -M vicmd '\e[1;3D' backward-word   # Alt-left
+bindkey -M vicmd '\e[1;3C' forward-word    # Alt-right
 
 # Enable useful features that emacs mode binds by default.
 # Binding '^R' here doesn't interfere with '^R' (undo) in vicmd mode.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]