Visual studio code (vscode)

更新 : 2017-03-01 html

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

這個插件可讓 html 整理起來比較好看. git

 

調東西 : typescript

左上角 File -> Preferences -> Workspace Settings ( User Settings 也能夠, 它是 for 全部的 project, Workspace 是針對目前這個 project )npm

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

    and node_mudules, debug.log visual-studio-code

     "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 Wheelangular2

 "editor.mouseWheelZoom": true   

 

2.1 scroll bar 旁邊的小圖ide

"editor.minimap.enabled": true

 

 

3.修改熱鍵 svn

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
相關文章
相關標籤/搜索