[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master efd4db0 2/2: Rebind Backspace to reduce aston
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master efd4db0 2/2: Rebind Backspace to reduce astonishment |
Date: |
Tue, 29 Oct 2019 18:12:20 -0400 (EDT) |
branch: master
commit efd4db08e9f0313b2dcac4f1c02c26e82bdd78db
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Rebind Backspace to reduce astonishment
By default:
https://github.com/vim/vim/blob/master/runtime/defaults.vim
vim includes 'start' in backspace:
" Allow backspacing over everything in insert mode.
set backspace=indent,eol,start
but zsh's vim mode behaves otherwise. Without this change:
- recall any command, but don't press Enter
- press Esc to enable the 'vicmd' keymap
- press 'a' to enable the 'viins' keymap
- press Backspace: surprisingly, it does nothing
---
gwc/.zshrc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gwc/.zshrc b/gwc/.zshrc
index fb2fc61..0e49afb 100644
--- a/gwc/.zshrc
+++ b/gwc/.zshrc
@@ -46,6 +46,9 @@ bindkey -v
# This seems to be set by default:
# bindkey '\e[3~' delete-char # Del
+# Replace the default vim keybinding, to reduce astonishment.
+bindkey '^?' backward-delete-char # Backspace
+
# Explicitly bind these--see:
# https://lists.nongnu.org/archive/html/lmi/2019-10/msg00032.html
bindkey '\e[H' beginning-of-line # Home