happiness (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) (^_^) happiness

vscodeにvim-abolishの機能を移植してみよう

概要

vimでは、以下のpluginを使うことでcgsコマンドで、camelCasesnake_caseに変換にできる

GitHub - tpope/vim-abolish: abolish.vim: easily search for, substitute, and abbreviate multiple variants of a word

vscodeで使うplugin change-case - Visual Studio Marketplace

やりかた

    "vim.normalModeKeyBindings": [

        {
        "before": [
                "c",
                "g",
                "c"
            ],
            "commands": [
                "extension.changeCase.pascal"
            ]
        },
        {
            "before": [
                "c",
                "g",
                "s",
            ],
            "commands": [
                "extension.changeCase.snake"
            ]
        },
}

蛇足

oo caseの種類がたくさんあるので、頑張って覚える - CamelCase, CONSTANT_CASE など ooケースまとめ - ゆもにっき-技術と生活改善と哲学-