New way to replace default key-mappings #134
machakann
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have made a few specification changes on key mappings recently.
TL;DR
If you would like to remap keys, write as follows.
Change
sa
,sd
,sr
,ib
,ab
,is
, andas
as you like.Disabling default key mappings
Old rules
Before the commit c387725, the default key mappings has been disabled by different options. This old rule was reasonable internally but not quite convenient for users. One is forced to define three options to disable all the default mappings. So I decided to change the way one disables those key mappings.
g:operator_sandwich_no_default_key_mappings
disabledsa
in normal, visual, and operator-pending modesd
in visual modesr
in visual modeg:textobj_sandwich_no_default_key_mappings
disabledib
andab
in visual and operator-pending modeis
andas
in visual and operator-pending modeg:sandwich_no_default_key_mappings
disabledsd
in normal modesr
in normal modeNew rules
With the new rule,
g:sandwich_no_default_key_mappings
disables all the default key-mappings anyway, and the other two options are kept for partial disabling.g:operator_sandwich_no_default_key_mappings
disablessa
in normal, visual, and operator-pending modesd
in normal and visual modesr
in normal and visual modeg:textobj_sandwich_no_default_key_mappings
disablesib
andab
in visual and operator-pending modeis
andas
in visual and operator-pending modeg:sandwich_no_default_key_mappings
disablesNew mapping interfaces
Before the commit b5bd9f4, several key mappings consisted of multiple key sequences. For example,
sd
in normal mode consisted of three key sequences.However, this interface is not so convenient to remap. Now the easier interfaces listed below are available.
<Plug>(sandwich-add)
<Plug>(sandwich-delete)
<Plug>(sandwich-replace)
sd
is then written in shorter form.Beta Was this translation helpful? Give feedback.
All reactions