zoukankan      html  css  js  c++  java
  • Visual Studio and Visual Studio Code (vscode)

    更新 : 2021-02-13

    auto refresh when save 

    https://dev.to/juxant/auto-refresh-with-dotnet-watch-for-asp-net-core-projects-20no

    option > Project and Solution > Asp.net core > auto buuld refresh options 选 after save change

    只有在 non debug mode 才管用哦

    vs code 不需要看到 refrence 

    把 editor.codeLens 关掉就可以了

    更新 : 2017-03-01 

    https://marketplace.visualstudio.com/items?itemName=HookyQR.beautify 

    这个插件可以让 html 整理起来比较好看. 

    调东西 : 

    左上角 File -> Preferences -> Workspace Settings ( User Settings 也可以, 它是 for 所有的 project, Workspace 是针对目前这个 project )

    1. hide .js, .map when use .ts 

        and node_mudules, debug.log 

         "files.exclude": {
            "**/.git": true,
            "**/.svn": true,
            "**/.hg": true,
            "**/.DS_Store": true,
            // add on
            "**/node_modules/": true,
            "**/npm-debug.log*/": true,
            "**/*.js.map": true,
            "**/*.js": {"when": "$(basename).ts"}
        }

    2.Zoom with mouse Wheel

     "editor.mouseWheelZoom": true   

    2.1 scroll bar 旁边的小图

    "editor.minimap.enabled": true

    3.修改热键 

    https://code.visualstudio.com/Docs/customization/keybindings

    File > Preferences > Keyboard Shortcuts. (Code > Preferences > Keyboard Shortcuts on Mac)

    // Place your key bindings in this file to overwrite the defaults
    [
        { 
            "key": "ctrl+l",
            "command": "editor.action.deleteLines",
            "when": "editorTextFocus && !editorReadonly"
        },
        { 
            "key": "ctrl+k ctrl+f",
            "command": "editor.action.format",
            "when": "editorHasFormattingProvider && editorTextFocus && !editorReadonly" 
        },  
        { 
            "key": "ctrl+w",   //本来是 ctrl+d, 而本来的 ctrl+w 是close window (看左边参考)
            "command": "editor.action.addSelectionToNextFindMatch",
            "when": "editorFocus"
        }     
    ]
    
    
    // Fold (Ctrl+Shift+[) folds the innermost uncollapsed region at the cursor
    // Unfold (Ctrl+Shift+]) unfolds the collapsed region at the cursor
    // Fold All (Ctrl+K Ctrl+0) folds all region in the editor
    // Unfold All (Ctrl+K Ctrl+J) unfolds all regions in the editor

    4. 常用 hotkeys (vscode and vs2015)

     
    ctrl enter / ctrl shift enter 插入空行
    ctrl w               select current full text 
    ctrl k f                            整理代码
    ctrl l             delete row 
    ctrl .             c# auto quick namespace
    ctrl space          智能提示
    ctrl shift m          打开 error list
    ctrl up donw        scrool
    ctrl shift s         save all document
    ctrl h            replace string
    shift f12         找指针
     
    vs code only
    ctrl shift { = vs2015 里面的 ctrl + m + m 把{...}收起来
     
    vs2015 only
    ctrl k d = 整面整理代码
     
     
    5.TypeScript version 
    refer : http://stackoverflow.com/questions/39668731/what-typescript-version-is-visual-studio-code-using-how-to-update-it
    要知道当前使用的 version 可以打开一个 .ts file 看右下角
    要全场升级或者单个特定版本参考上面链接 
     
     
    6. 开发 angular2 常用插件 : 
    -https://marketplace.visualstudio.com/items?itemName=danwahlin.angular2-snippets 
    -https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory
     
  • 相关阅读:
    2021,6,10 xjzx 模拟考试
    平衡树(二)——Treap
    AtCoder Beginner Contest 204 A-E简要题解
    POJ 2311 Cutting Game 题解
    Codeforces 990G GCD Counting 题解
    NOI2021 SDPTT D2T1 我已经完全理解了 DFS 序线段树 题解
    第三届山东省青少年创意编程与智能设计大赛总结
    Luogu P6042 「ACOI2020」学园祭 题解
    联合省选2021 游记
    Codeforces 1498E Two Houses 题解 —— 如何用结论吊打标算
  • 原文地址:https://www.cnblogs.com/keatkeat/p/5869426.html
Copyright © 2011-2022 走看看