zoukankan      html  css  js  c++  java
  • Visual Studio Code代码格式化Vue文件设置快捷键ctrl+alt+l

    【vscode中使用beautify插件格式化vue文件(自定义快捷键)】https://blog.csdn.net/jiandan1127/article/details/85958965


    C:UsersqinmtAppDataRoamingCodeUsersettings.json

    {
        "files.autoSave": "afterDelay",             
        "editor.fontSize": 15,               
        "vetur.format.defaultFormatter.html": "js-beautify-html",
        "files.associations": {
            "*.wxml": "wxml",
            "*.vue": "vue-html"
        },
        "explorer.confirmDelete": false,
        "workbench.colorTheme": "Visual Studio Dark",
        "svn.enableProposedApi": "product",
        "editor.quickSuggestions": {
            "strings": true
        },
        "git.autofetch": true,
        "[vue-html]": {
            
        },
        "beautify.language": {
            "js": {
            "type": [
                "javascript",
                "json"
            ],
            "filename": [
                ".jshintrc",
                ".jsbeautify"
                ]
            },
            "css": [
                "css",
                "scss"
            ],
            "html": [
                "htm",
                "html",
                "vue"//在这里加上vue
            ]
        }
    }

    将键绑定放在此文件中以覆盖默认值

    C:UsersKegogAppDataRoamingCodeUserkeybindings.json

    [
    {
    "key": "ctrl+alt+l", // 自己定键位
    "command": "HookyQR.beautify",
    "when": "editorFocus"
    }
    ]
    

      

    .jsbeautifyrc

    {
        "brace_style": "none,preserve-inline",
        "indent_size": 4,
        "indent_char": " ",
        "inline": ["a-input"],
        "jslint_happy": false,
        "unformatted": ["v-decorator"],
        "css": {
            "indent_size": 2
        }
    }
  • 相关阅读:
    POJ 1061
    hihocoder 1330
    HDU 1525
    UVALive 3938
    POJ 2528
    HDU 1754
    《ACM-ICPC程序设计系列 数论及其应用》例题个人答案记录
    URAL 1277
    HDU 3746
    HDU 2087
  • 原文地址:https://www.cnblogs.com/choucat/p/11104155.html
Copyright © 2011-2022 走看看