From b1fd84a499e095deebb26f7917a42d8164955d16 Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Mon, 25 Jan 2021 23:08:03 +0800 Subject: [PATCH] edit: change "C-w" and "M-w" to operate on backward words --- keymap/emacs.sh | 1 + keymap/vi.sh | 1 + src/edit.sh | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/keymap/emacs.sh b/keymap/emacs.sh index ae1b13d5..b8d87048 100644 --- a/keymap/emacs.sh +++ b/keymap/emacs.sh @@ -7,6 +7,7 @@ function ble-edit/bind/load-keymap-definition:emacs { :; } # 2015-12-09 keymap cache should be updated due to the refactoring. # 2019-01-18 keymap cache should be updated for recent changes # 2019-04-01 keymap cache should be updated for adding __error__ +# 2021-01-25 force update (change mapping of C-w and M-w) #------------------------------------------------------------------------------ diff --git a/keymap/vi.sh b/keymap/vi.sh index d6807ec4..6e31b6ec 100644 --- a/keymap/vi.sh +++ b/keymap/vi.sh @@ -6,6 +6,7 @@ ble/is-function ble-edit/bind/load-keymap-definition:vi && return function ble-edit/bind/load-keymap-definition:vi { :; } # 2019-04-01 keymap cache should be updated for adding __error__ +# 2021-01-25 force update (change mapping of C-w and M-w) source "$_ble_base/keymap/vi_digraph.sh" diff --git a/src/edit.sh b/src/edit.sh index 01a262cf..ea6e9ddd 100644 --- a/src/edit.sh +++ b/src/edit.sh @@ -6332,8 +6332,8 @@ function ble-decode/keymap:safe/bind-common { ble-decode/keymap:safe/.bind 'NUL' 'set-mark' ble-decode/keymap:safe/.bind 'M-SP' 'set-mark' ble-decode/keymap:safe/.bind 'C-x C-x' 'exchange-point-and-mark' - ble-decode/keymap:safe/.bind 'C-w' 'kill-region-or uword' - ble-decode/keymap:safe/.bind 'M-w' 'copy-region-or uword' + ble-decode/keymap:safe/.bind 'C-w' 'kill-region-or backward-uword' + ble-decode/keymap:safe/.bind 'M-w' 'copy-region-or backward-uword' ble-decode/keymap:safe/.bind 'C-y' 'yank' # spaces