Is your feature request related to a problem? Please describe.
Describe the solution you'd like
Have you tried mapping d to "_d?
Have you tried mapping
dto"_d?
... just don't know what the meaning ofd? and how to mapping? or is there any doc?
Add this to you settings.json
{
"before": ["d"],
"after": ["\"", "_", "d"]
}
And you might also want to add one for dd and D.
{
"before": ["D"],
"after": ["\"", "_", "D"]
},
{
"before": ["d", "d"],
"after": ["\"", "_", "d", "d"]
}
d = delete
"_ = Sets the register for the next copy to _ which is not what your clipboard uses. So you will keep whatever is on your clipboard.
@Sheepolution @J-Fields I find new problem: in macvim, there seem to be 2 different clipboards, one for copying manaully, another for vim delete or yank, so command+v and p paste different text; But here I can never do this, the two always paste the same text. If I map d to "_d, the p paste the text from I copying manaully, not I delete. It seems to be a paradox.
@huangyingjie
Let vim use the system clipboard.
"vim.useSystemClipboard": true
@Sheepolution thx a lot, but it had already been true. And Could this feature be default, even these config work perfectly, just image c/C,x/X,s/S, normalMode, visualMode, too many code
@Sheepolution @J-Fields and everyone Trying "vim.useSystemClipboard": false fit my problem. I just want VSCodeVim do exactly the same as vim on mac.
For anyone else landing here from google, these are the settings that work for me (in settings.json):
{
"vim.useSystemClipboard": true,
"vim.normalModeKeyBindings": [
{
"before": [ "d" ],
"after": [ "\"", "_", "d" ]
},
{
"before": [ "D" ],
"after": [ "\"", "_", "D" ]
},
{
"before": [ "d", "d" ],
"after": [ "\"", "_", "d", "d" ]
}
]
}
@rijkvanzanten Don't know what's different for me, but these settings seem to hang my vscode as soon as a type 'd' and I have to reload the window. It's like they cause an infinite loop in the vim extension.
@konradsa I faced the same issue. Please put the bindings into vim.normalModeKeyBindingsNonRecursive to avoid the VS Code Vim hang.
Most helpful comment
For anyone else landing here from google, these are the settings that work for me (in
settings.json):