Closed eyaleizenberg closed 6 years ago
Here is answer and how you can do by yourself next time.
In this case, find w
here.
https://github.com/t9md/atom-vim-mode-plus/blob/master/keymaps/vim-mode-plus.cson#L66
keymap.cson
with same keymap scope.You can open your keymap by invoking Open Your Keymap
command from command-palette.
'atom-text-editor.vim-mode-plus:not(.insert-mode)':
'space w': 'vim-mode-plus:move-to-next-word'
'space b': 'vim-mode-plus:move-to-previous-subword'
'space e': 'vim-mode-plus:move-to-end-of-subword'
For space d
to delete subword mapping, you cannot do it unless you define your own custom operator or hack keymap system.
But you can map d ANYKEY
to delete subword
.
With following example, you can d x
to delete subword TextObject.
'atom-text-editor.vim-mode-plus.operator-pending-mode.delete-pending':
'd x': 'vim-mode-plus:inner-subword'
Btw, vim-mode-plus have following default keymap.
i d
(inner-subword
)a d
(a-subword
)So you can do d i d
to delete subword
without any custom keymap.
http://flight-manual.atom.io/behind-atom/sections/keymaps-in-depth/ https://github.com/t9md/atom-vim-mode-plus/blob/master/keymaps/vim-mode-plus.cson https://github.com/t9md/dotfiles
@t9md Thanks a lot! The d i d
is really useful. Thanks!
Btw, vmp have shorthand keystroke(= one-keystroke text-object shorthand).
So you can type
y p
, instead of y i p
.y ,
instead of y i ,
(argument TextObject)y d
instead of y i d
(subword)You can swap y
(yank) operator with any other operator like c p
, c ,
, c d
.
But d d
doesn't work as delete subword
. since y y
, d d
, c c
have have special meaning, so one-key shorthand keymap is disabled in conflicting case like this.
These keymaps are available only in operator-pending
mode(in other words, it's not available in visual-mode
).
If you want use c c
to change word
too. You can enable it via configuration keymapCCToChangeInnerSmartWord
.
I want to remap
space-w
,space-e
,space-b
,space-d
,space-D
for example to do the appropriate subword actions (move to next subword, end of next subword, back subword, delete subword, delete subword back).However, I can't get the mappings to work for me? Can you please post examples of the correct key mappings for this?
Thanks a lot! This package is a life saviour!
Check list
atom --version
)