我试图绑定“:W”编辑器命令来保存文件,就像“:w”一样。我犯了很多错字。
vim插件为:https://marketplace.visualstudio.com/items?itemName=vscodevim.vim
此settings.json代码无效:
cssLabel: {
"&$cssFocused": {
color: { borderColor: "red", padding: 0 }
}
},
cssFocused: { borderColor: "red", padding: 0 },
cssUnderline: {
"&:after": {
borderBottomColor: "red",
padding: 0
}
},
// cssOutlinedInput: {
// "&$cssFocused $notchedOutline": {
// borderColor: "green"
// }
// },
cssOutlinedInput: {
"& $notchedOutline": {
//add this nested selector
borderColor: "red",
padding: 0
},
"&$cssFocused $notchedOutline": {
borderColor: "green",
padding: 0
}
},
notchedOutline: { borderColor: "red", padding: 0 },
答案 0 :(得分:0)
不幸的是,在vs vim中这是不可能的,但是我最终做了bsaf suggested here,然后将:
反弹到;
,这样我就不会在按下的同时意外地按住shift键。 w
,它不能解决您提出的问题,但可以解决您在帖子中提到的问题。您可以通过将其添加到settings.json文件中来实现:
"vim.normalModeKeyBindings": [
{
"before": [";"],
"after": [":"]
}
]
您仍然可以照常使用:
,但现在;
也将允许您运行编辑器命令。