关于visual-studio-code:my-vscode-in-ubuntu

5次阅读

共计 2758 个字符,预计需要花费 7 分钟才能阅读完成。

settings.json

{
    // =============================== 通用设置 =============================
    "editor.tabSize": 4,    //tab 格数
    "editor.fontSize": 16,  // 编辑区字体大小
    "explorer.autoReveal": false, // 敞开关上文件查看器时文件夹主动开展

    // =============================== git 设置 =============================
    // "git.ignoreMissingGitWarning": true,

    // =================================== vim =============================
    // 光标通过代码折叠出不主动开展
    "vim.foldfix": true,
    "vim.easymution": true,
    "vim.incsearch": true,
    "vim.useSystemClipboard": true,
    "vim.useCtrlKeys": true,
    "vim.hlsearch": true,
    "vim.insertModeKeyBindings": [
        {"before": ["j", "k"],
            "after": ["<Esc>"]
        },
    ],
    "vim.normalModeKeyBindingsNonRecursive": [
        // {//   "before": ["<leader>", "d"],
        //   "after": ["d", "d"]
        // },
        {"before": ["<C-n>"],
            "commands": [":nohl"]
        },
        {"before": ["K"],
            "after": ["g", "t"]
        },
        {"before": ["J"],
            "after": ["g", "T"]
        },
        {"before": ["<leader>", "j"],
            "after": ["J"]
        },
        {"before": [","],
            "after": ["s"]
        },
        {"before": ["<"],
            "after": ["S"]
        }
    ],
    "vim.leader": "<space>",
    "vim.handleKeys": {
        "<C-a>": false,
        "<C-f>": false,
        "<C-b>": false,
        "<C-e>": false,
    },
    "window.zoomLevel": 0,
    "update.mode": "none",


    // ======================== vim ibus im-select =====================
    // "vim.autoSwitchInputMethod.enable": true,
    // "vim.autoSwitchInputMethod.defaultIM": "xkb:us::eng",
    // "vim.autoSwitchInputMethod.obtainIMCmd": "/usr/bin/ibus engine",
    // "vim.autoSwitchInputMethod.switchIMCmd": "/usr/bin/ibus engine {im}"
}

vue settings.json

{
  "editor.tabSize": 2,
  // ===============================eslint====================
  // 保留后主动修复格局
  "editor.codeActionsOnSave": {"source.fixAll.eslint": true},
  // "editor.formatOnSave": true, // 保留主动格局  化
  // 增加 vue 反对
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "vue"
  ],
  // ================================ sass ==============================
}

vscode snippet

文件正文 (上面是 h5 的例子)

{
    "Print to console": {
        "prefix": "h5_header",
        "body": [
            "<!--",
            "* @Author: zhangyu",
            "* @Date: $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
            "* @LastEditors: Please set LastEditors",
            "* @Description: $0",
            "* @FilePath: $RELATIVE_FILEPATH",
            "-->",
        ],
        "description": "Log output to console"
    }

}

vue files

{
    "Print to console": {
        "prefix": "vue",
        "body": [
            "<!--",
            "* @Author: zhangyu",
            "* @Date: $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
            "* @LastEditors: Please set LastEditors",
            "* @Description: $0",
            "* @FilePath: $RELATIVE_FILEPATH",
            "-->",
            "<template>",
            "<div class=\"$1\">$2</div>",
            "</template>",
            "","<script>","",
            "export default {",
            "components: {},",
            "filters: {},",
            "data() {",
            "return {",
            "","        };","    },","    computed: {},","    watch: {},","    created() {},","    mounted() {},","    methods: {}",
            //"beforeCreate() {},",
            //"beforeMount() {},",
            //"beforeUpdate() {},",
            //"updated() {},",
            //"beforeDestroy() {},",
            //"destroyed() {},",
            //"activated() {},",
            "};",
            "</script>",
            "<style lang='scss'scoped>",
            "//@import url(); 引入公共 css 类",
            "","</style>",""
        ],
        "description": "Log output to console"
    }
}

vscode-extends


正文完
 0