[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 1f2172c 1/3: Improve bindings for Home and En
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 1f2172c 1/3: Improve bindings for Home and End keys |
Date: |
Mon, 28 Oct 2019 07:14:03 -0400 (EDT) |
branch: master
commit 1f2172c2a8722c80da70312645eb3a940d2e5863
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Improve bindings for Home and End keys
---
gwc/.zshrc | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/gwc/.zshrc b/gwc/.zshrc
index 94fd576..8a0f8d7 100644
--- a/gwc/.zshrc
+++ b/gwc/.zshrc
@@ -43,10 +43,17 @@ export LESSCHARSET=utf-8
# Use vim keybindings.
bindkey -v
-# These three seem to be set by default:
+# This seems to be set by default:
# bindkey '\e[3~' delete-char # Del
-# bindkey '\e[H' beginning-of-line # Home
-# bindkey '\e[F' end-of-line # End
+
+# Explicitly bind these--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
+# 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 '\e[1;5D' backward-word # Ctrl-left
bindkey '\e[1;5C' forward-word # Ctrl-right
bindkey '\e[1;3D' backward-word # Alt-left