美文网首页
vs-code技巧

vs-code技巧

作者: 废弃的种子 | 来源:发表于2020-08-31 23:05 被阅读0次

    使用技巧

    编译插件

    image.png

    *** 1、注释插件 koroFileheader ***
    安装后,文件——首选项——设置 搜索fileheader,选择最后一个进行编辑;

      "fileheader.customMade": {
        //此为头部注释  ctrl+alt+i
        "Description": "",
        "Autor": "sy",
        "Date": "Do not edit",
        "LastEditors": "sy",
        "LastEditTime": "Do not edit"
      },
      "fileheader.cursorMode": {
        //此为函数注释   ctrl+alt+t
        "description": "",
        "param": "",
        "return": "",
        "author": "sy"
      }
    
    

    即可
    *** 2、Ctrl+G 快速定位到行数***
    *** 3、配置console.log()快捷键***
    文件——首选项——用户代码片段——搜索javascript,放开注释

        "Print to console": {
            "prefix": "log",
            "body": [
                "console.log('$1');",
                "$2"
            ],
            "description": "Log output to console"
        }
    

    4、 Vue代码换行问题
    文件——首选项——设置——扩展——Vetor

    image.png
    image.png
    image.png
    所有插件配置
    {
      "files.autoSave": "afterDelay",
      "[javascript]": {
        "editor.defaultFormatter": "vscode.typescript-language-features"
      },
      "editor.fontLigatures": null,
      "files.associations": {
        "*.js": "javascript"
      },
      "[jsonc]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
      },
      "[javascriptreact]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
      },
      "[dart]": {
        "editor.formatOnSave": true,
        "editor.formatOnType": true,
        "editor.rulers": [80],
        "editor.selectionHighlight": false,
        "editor.suggest.snippetsPreventQuickSuggestions": false,
        "editor.suggestSelection": "first",
        "editor.tabCompletion": "onlySnippets",
        "editor.wordBasedSuggestions": false
      },
      "dart.openDevTools": "flutter",
      "[vue]": {
        "editor.defaultFormatter": "octref.vetur"
      },
      "terminal.integrated.tabs.enabled": true,
      "[html]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
      },
      "fileheader.customMade": {
        //此为头部注释  ctrl+alt+i
        "Description": "",
        "Date": "Do not edit",
        "LastEditTime": "Do not edit"
      },
      "fileheader.cursorMode": {
        //此为函数注释   ctrl+alt+t
        "description": "",
        "param": "",
        "return": ""
      },
      "[typescript]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
      },
      "workbench.startupEditor": "none",
      "terminal.integrated.defaultProfile.windows": "Command Prompt",
      "editor.codeActionsOnSave": null,
      "vetur.format.defaultFormatterOptions": {
        
    
        "js-beautify-html": {
          // "wrap_attributes": "force-expand-multiline"
          "wrap_line_length": 200,
          "wrap_attributes": "auto",
          "end_with_newline": false
        },
        "prettyhtml": {
          "printWidth": 100,
          "singleQuote": false,
          "wrapAttributes": false,
          "sortAttributes": false
        }
      },
      "vetur.grammar.customBlocks": {
      
        "docs": "md",
        "i18n": "json"
      },
      "vetur.format.defaultFormatter.html": "js-beautify-html"
    }
    
    

    相关文章

      网友评论

          本文标题:vs-code技巧

          本文链接:https://www.haomeiwen.com/subject/bsurrktx.html