VS Code 1.18版本更新内容整理(2017年10月 October 2017)
久前開始使用的VS Code,使用一段時間以后確實感覺比之前在用的Sublime Text好很多,可能是漢化及插件方面使用做的更好吧。
今天推送到更新到1.18,按我的個性,喜歡一個東西的話,我就回去了解熟悉,從而更好的使用,不論是開發工具也好,亦或開發框架也好。
奈何官方的更新文檔是英文的(這不是廢話嘛!),考慮到小伙伴們閱讀起來還是比較累的(包括我自己),因此大概整理了一下,僅供參考。
由于部分功能我自己也沒有用過,因此如果翻譯或者理解上有錯誤,歡迎指正!
更新說明原文:https://code.visualstudio.com/updates/v1_18
工作臺
1、工作區支持多個根目錄文件
在文件菜單下拉操作,或者直接拖動文件夾到管理界面
?
另外還有一個詳細說明文檔,包括設置、討論、調試等:https://code.visualstudio.com/docs/editor/multi-root-workspaces
注明:插件開發者需要根據新的文檔和接口進行開發或者改進
?
2、git項目文件狀態能夠在資源管理器的界面上顯示
相關配置參數:
git.decorations.enabled // 設置是否在資源管理器界面的文件上顯示,默認true explorer.decorations.colors // 控制文件修飾是否用顏色,默認true?
explorer.decorations.badges // 控制文件修飾是否用徽章?
注明:插件開發者需要根據新的文檔和接口進行開發或者改進
?
3、控制臺面板現在可以垂直顯示
4、控制臺面板標題欄展示改進
可以選擇欄目展示或隱藏,在空間不足時自動縮略,右鍵可以選擇展示項等。參考下圖演示
?
5、軟件圖標變成了藍色
?
6、拖動文件夾到資源管理器中的時候有提示確認框,為了防止誤操作。
配置參數可以取消該提示信息
explorer.confirmDragAndDrop // 默認為true?
explorer.confirmDelete // 控制資源管理器是否應在刪除文件到回收站時進行確認?
?
7、快速打開功能也支持打開 .gitignore 中的文件
search.useIgnoreFiles // 配置該參數可以讓快速打開功能(Ctrl + P)打開.gitignore 中的文件?
?
編輯
1、Ctrl+D / Cmd+D 功能改進
添加下一個匹配項到選擇項(Ctrl + D)功能現在改進為:使用該快捷鍵功能時,將暫時忽略原先搜索欄中的匹配項,改為區分大小寫全字匹配當前光標所在單詞。
?
2、定位到下一個/上一個匹配單詞前并高亮顯示
定位到下一個(F7)或者上一個(Shift + F7)與當前光標匹配的單詞前方,并高亮顯示
?
集成終端
1、支持弱文本序列的轉義
Ps:這個我也不太明白理解的對不對,自己看圖例吧
?
2、重設環境變量
?
//要添加到 VS Code 進程中的帶有環境變量的對象,其會被 Linux 終端使用。現在可以自己設置為null "terminal.integrated.env.linux": {"HOME": null }?
?
3、Windows客戶端功能改進
- Deeply nested processes are now properly cleaned up after exiting the terminal session. This happened most frequently with servers launched from Node.js.
- On Windows, the terminal received lines already wrapped so we don't know which lines are wrapped and which are separated by new lines. We now guess where lines are wrapped by checking the last character of the previous line and flag them as such. This fixes a?problem with tasks?where problem matchers would break on Windows and is also one of the prerequisites to get?multi-line linksworking on Windows.
?
語言
1、支持TypeScript 2.6.1 并修復了一些BUG
?
2、自動引入 JavaScript 和 TypeScript 代碼提示支持
代碼輸入提示現在默認支持 JavaScript 和 TypeScript ,同時,若自己引入了其他js文件,它也會被支持代碼提示。
typescript.autoImportSuggestions.enabled // 啟用或禁用自動導入建議。要求 TypeScript >= 2.6.1 默認true?
?
3、本地化的錯誤提示和快速修復描述(JavaScript 和 TypeScript)
typescript.locale //設置報告 TypeScript 錯誤時使用的區域設置。要求 TypeScript >= 2.6.0。默認 ("null") 將使用 VS Code 的區域設置。?
可以自己設置想要提升的信息語言,如:
"typescript.locale": "en"?
?
4、對?JavaScript 和 TypeScript 進行局部代碼重構
相對v1.16版本來說,該v1.18版本增加了新的局部代碼重構方式:提取常量重構為當前選定的表達式創建一個新的局部變量。
Ps:此處翻譯或表達可能不太清晰,因為我自己目前為止也沒用過該功能。建議自己查看官方說明及演示圖片。(歡迎指正)
?
5、Install @types Quick Fix for TypeScript
TypeScript now offers a Quick Fix to?npm install?missing?@types?definitions for a given module:
This Quick Fix will install the?@types?definition locally and add it to the?devDependencies?in your?package.json.
?
6、添加額外的參數配置
// 控制 tsc 任務的自動檢測。"off" 關閉此功能。"build" 僅創建單次運行編譯任務。"watch" 僅創建編譯及監視任務。"on" 創建構建及監視任務。默認值為 "on"。"typescript.tsc.autoDetect": "on"?
?
7、支持在字符串和注釋中選擇性地啟用快速建議
默認情況下,在字符串和注釋中禁用快速建議。在某些情況下,如JavaScript模板字符串中,字符串或注釋可能包含代碼塊,其中應啟用快速建議。現在可以通過語法已經一些暗殺等重新啟用快速建議。
Quick suggestions are disabled inside of strings and comments?by default. In some cases, such as in JavaScript template strings, a string or comment may contain blocks of code where quick suggestions should be enabled. Grammars can now hint that VS Code should re-enable quick suggestions by adding a?meta.embedded?scope on tokens inside of a string or comment
?
8、Json:對新規范的支持等
JSON now supports JSON Schema Draft 06. The most notable additions are the?const,?contains?and?propertyNames?properties. Read?here?for a more detailed overview of changes from draft 04.
?
源碼控制
1、內聯變更審查
現在可以直接在編譯器內檢查源代碼的更改。這個特性取決于它是否被源代碼提供者支持,但是它已經為開箱即用的Git倉庫啟用了。
You can now review source code changes right within the standard editor. This feature depends on whether it is supported by the source code provider but it is already enabled for Git repositories out of the box.
?
2、Git 沖突檢查
?
3、Git 集成改進
Recently, there was a?patch to Git?which enables tools like VS Code to use?git status?without interfering with other concurrent Git commands. VS Code is now prepared for that upcoming Git change by using the right environment context (GIT_OPTIONAL_LOCKS) when spawning Git.
?
擴展
1、現在建議拓展左上角有一個五角星徽章,以便跟其他拓展插件做區分
?
2、Single view combining workspace and general recommendations
The two views for?workspace recommended extensions?and general recommended extensions are now combined into a single view with the two kinds of recommendations showing up in a split view. Use the command?Extensions: Show Recommended Extensions?to see this view.
There is also a handy?Install All Workspace Recommendations?command on the?WORKSPACE RECOMMENDATIONS?title bar to install all the extensions that are recommended by other users of your workspace.
You can edit workspace recommendations via the?Configure Recommended Extensions (Workspace Folder)?command in the same title bar.
Ps:這部分說明我理解起來感覺特迷糊,各位根據下圖演示自行體會吧。
?
調試
1、在下面的狀態欄中顯示調試控件
可以不需要切換到調試界面,就啟用調試功能并進行簡單的切換。
?
2、新的命令:Focus actions
增加了新的命令和控制,讓習慣鍵盤控制的用戶用的更舒適。
- Focus Variables:?workbench.debug.action.focusVariablesView
- Focus Watch:?workbench.debug.action.focusWatchView
- Focus CallStack:?workbench.debug.action.focusCallStackView
- Focus Breakpoints:?workbench.debug.action.focusBreakpointsView
?
3、運行程序(非調試模式)的快捷鍵修改以避免鍵盤沖突
為避免macOS系統的鍵盤沖突問題,運行程序(非調試模式)的快捷鍵修改為 Ctrl + F5
注:控制臺命令為?Debug: Start Without Debugging
?
4、調試控制臺顯示結果會根據類型的展示顏色區別
調試控制臺會根據結果類型展示不同的顏色,改功能基于Node.js調試插件。
5、More WSL support for Node.js
A?first glimpse?of support for Node.js debugging in the?Windows Subsystem for Linux (WSL)?was already available in the previous milestone (but only for older versions of Node.js that still support the "legacy" protocol). In this milestone, another?pull request?by?Bartosz Sosnowski (@bzoz)?was integrated that adds support for the "inspector" protocol that is used by more recent versions of Node.js. With this update, it is now possible to run Node.js v8 in WSL.
?
其他
我個人認為接下來的官方更新說明并不是很重要,主要內容涉及:主題皮膚、文件內容的凸顯、工作空間、開發者接口、性能上的提升、文件目錄圖標、以及新的API和命令等。
唯一需要注意的是官方即將使用?WorkspaceFolder 替換?workspaceRoot,目前是最后一個支持workspaceRoot的版本。
WorkspaceFolder?replaces?workspaceRoot
Last release, we deprecated the?${workspaceRoot}?variable in favor of?${workspaceFolder}?to make this consistent with multi-root workspace support. For the same reason, we are deprecating?${workspaceRootFolderName}. Please use?${workspaceFolderBasename}?instead. This deprecation applies to debug launch configurations as well.
有興趣的朋友可以自己去閱讀后面的內容(包括前面的)。
?
?
花了將近一天時間翻譯整理出來的,希望看到感覺不錯的朋友能支持下~
?
posted on 2017-11-09 16:10 Rebuilding127 閱讀(...) 評論(...) 編輯 收藏轉載于:https://www.cnblogs.com/dmh-blog/p/7809920.html
總結
以上是生活随笔為你收集整理的VS Code 1.18版本更新内容整理(2017年10月 October 2017)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python_初步
- 下一篇: Teleport Pro使用教程