VScode Vim插件快速上手与配置

快速安装:

打开market place,搜索vim即可安装。

基本改建与配置说明:

方向键:

用I k j l表示光标上下左右,需要编辑visual mode和normal mode

{
    "vim.normalModeKeyBindingsNonRecursive":[
        {
            "before": ["j"],
            "after": ["h"]
        },
        {
            "before": ["k"],
            "after": ["j"]
        },        
        {
            "before": ["i"],
            "after": ["k"]
        },
        {
            "before": ["h"],
            "after": ["i"]
        },
    ],
    "vim.visualModeKeyBindingsNonRecursive":[
        {
            "before": ["j"],
            "after": ["h"]
        },
        {
            "before": ["k"],
            "after": ["j"]
        },        
        {
            "before": ["i"],
            "after": ["k"]
        },
        {  
            "before": ["h"],

            "after": ["i"]
        },
    ]

保存和退出

"vim.normalModeKeyBindingsNonRecursive":[
        {
            "before": ["S"],
            "commands": [":w"]
        },
        {
            "before": ["Q"],
            "commands": [":q"]
        },
    ],

打开搜索高亮并将关闭搜索高亮设置为即空格加回车

"vim.leader": "<space>",
    "vim.hlsearch": true,
    "vim.normalModeKeyBindingsNonRecursive":[
        {
            "before": ["<leader>", "<CR>"],
            "commands": [":noh"]
        },
    ]

使用并配置vim-easymotion插件

"vim.easymotion": true,
    "vim.easymotionKeys": "qwertyuiopasdfghjkl;zxcvbnm,",
    "vim.easymotionMarkerFontSize": "22",

使control可用

个人主要是为了使用vscode的markdown插件的快捷键,进行该设置后vim有关control的操作不可用

"vim.useCtrlKeys": false

相关推荐