第十八天
vim 调用 vscode 命令
commands
字段
- 格式化文档(
<Leader>
+f + d
) - 重命名(
<Leader>
+r + n
) - 折叠文档(
fold
)<Leader>
+[
- 恢复(
fold
)<Leader>
+]
json
// settings.json
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["<Leader>", "f", "d"],
"commands": ["editor.action.formatDocument"]
},
{
"before": ["<Leader>", "r", "n"],
"commands": ["editor.action.rename"]
},
{
"before": ["<Leader>", "["],
"commands": [
{
"command": "editor.fold"
},
{
"command": "vim.remap",
"args": {
"after": ["$", "%"]
}
}
]
},
{
"before": ["<Leader>", "]"],
"commands": [
{
"command": "editor.unfold"
}
]
},
],