I would like to change dd
(delete and put into register) to "_dd
(delete and put into black hole register). I tried below remap, to no avail.
{
"before": [
"d",
"d"
],
"after": [
"\"",
"_",
"d",
"d",
]
}
leader
, it works.
{
"before": [
"<leader>",
"d"
],
"after": [
"\"",
"_",
"d",
"d",
]
},
dd
?
Thanks.
You can use this:
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["d"],
"after": [ "\"", "_", "d" ]
}
]
but the catch is that it changes the 'd', instead of changing 'dd' i.e. 'dd' will work as you want but it will also change every keymapping related to 'd'.
'dw' will also delete to 'black hole' register, so will 'dd'
To know more check out this https://github.com/VSCodeVim/Vim/pull/3081
Remapping 'dd' doesn't change like it does in vim, it is better to use the 'leader d' to get what you want if you don't want to change the default functionality of 'd'.
In short vim can do what you want but vim plugin in vscode doesn't support it now.