VS Code 1.18版本更新内容整理(2017年10月 October 2017)
久前開始使用的VS Code,使用一段時間以后確實感覺比之前在用的Sublime Text好很多,可能是漢化及插件方面使用做的更好吧。
今天推送到更新到1.18,按我的個性,喜歡一個東西的話,我就回去了解熟悉,從而更好的使用,不論是開發(fā)工具也好,亦或開發(fā)框架也好。
奈何官方的更新文檔是英文的(這不是廢話嘛!),考慮到小伙伴們閱讀起來還是比較累的(包括我自己),因此大概整理了一下,僅供參考。
由于部分功能我自己也沒有用過,因此如果翻譯或者理解上有錯誤,歡迎指正!
更新說明原文:https://code.visualstudio.com/updates/v1_18
工作臺
1、工作區(qū)支持多個根目錄文件
在文件菜單下拉操作,或者直接拖動文件夾到管理界面
?
另外還有一個詳細說明文檔,包括設(shè)置、討論、調(diào)試等:https://code.visualstudio.com/docs/editor/multi-root-workspaces
注明:插件開發(fā)者需要根據(jù)新的文檔和接口進行開發(fā)或者改進
?
2、git項目文件狀態(tài)能夠在資源管理器的界面上顯示
相關(guān)配置參數(shù):
git.decorations.enabled // 設(shè)置是否在資源管理器界面的文件上顯示,默認true explorer.decorations.colors // 控制文件修飾是否用顏色,默認true?
explorer.decorations.badges // 控制文件修飾是否用徽章?
注明:插件開發(fā)者需要根據(jù)新的文檔和接口進行開發(fā)或者改進
?
3、控制臺面板現(xiàn)在可以垂直顯示
4、控制臺面板標題欄展示改進
可以選擇欄目展示或隱藏,在空間不足時自動縮略,右鍵可以選擇展示項等。參考下圖演示
?
5、軟件圖標變成了藍色
?
6、拖動文件夾到資源管理器中的時候有提示確認框,為了防止誤操作。
配置參數(shù)可以取消該提示信息
explorer.confirmDragAndDrop // 默認為true?
explorer.confirmDelete // 控制資源管理器是否應(yīng)在刪除文件到回收站時進行確認?
?
7、快速打開功能也支持打開 .gitignore 中的文件
search.useIgnoreFiles // 配置該參數(shù)可以讓快速打開功能(Ctrl + P)打開.gitignore 中的文件?
?
編輯
1、Ctrl+D / Cmd+D 功能改進
添加下一個匹配項到選擇項(Ctrl + D)功能現(xiàn)在改進為:使用該快捷鍵功能時,將暫時忽略原先搜索欄中的匹配項,改為區(qū)分大小寫全字匹配當前光標所在單詞。
?
2、定位到下一個/上一個匹配單詞前并高亮顯示
定位到下一個(F7)或者上一個(Shift + F7)與當前光標匹配的單詞前方,并高亮顯示
?
集成終端
1、支持弱文本序列的轉(zhuǎn)義
Ps:這個我也不太明白理解的對不對,自己看圖例吧
?
2、重設(shè)環(huán)境變量
?
//要添加到 VS Code 進程中的帶有環(huán)境變量的對象,其會被 Linux 終端使用?,F(xiàn)在可以自己設(shè)置為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 代碼提示支持
代碼輸入提示現(xiàn)在默認支持 JavaScript 和 TypeScript ,同時,若自己引入了其他js文件,它也會被支持代碼提示。
typescript.autoImportSuggestions.enabled // 啟用或禁用自動導入建議。要求 TypeScript >= 2.6.1 默認true?
?
3、本地化的錯誤提示和快速修復描述(JavaScript 和 TypeScript)
typescript.locale //設(shè)置報告 TypeScript 錯誤時使用的區(qū)域設(shè)置。要求 TypeScript >= 2.6.0。默認 ("null") 將使用 VS Code 的區(qū)域設(shè)置。?
可以自己設(shè)置想要提升的信息語言,如:
"typescript.locale": "en"?
?
4、對?JavaScript 和 TypeScript 進行局部代碼重構(gòu)
相對v1.16版本來說,該v1.18版本增加了新的局部代碼重構(gòu)方式:提取常量重構(gòu)為當前選定的表達式創(chuàng)建一個新的局部變量。
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、添加額外的參數(shù)配置
// 控制 tsc 任務(wù)的自動檢測。"off" 關(guān)閉此功能。"build" 僅創(chuàng)建單次運行編譯任務(wù)。"watch" 僅創(chuàng)建編譯及監(jiān)視任務(wù)。"on" 創(chuàng)建構(gòu)建及監(jiān)視任務(wù)。默認值為 "on"。"typescript.tsc.autoDetect": "on"?
?
7、支持在字符串和注釋中選擇性地啟用快速建議
默認情況下,在字符串和注釋中禁用快速建議。在某些情況下,如JavaScript模板字符串中,字符串或注釋可能包含代碼塊,其中應(yīng)啟用快速建議。現(xiàn)在可以通過語法已經(jīng)一些暗殺等重新啟用快速建議。
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:對新規(guī)范的支持等
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、內(nèi)聯(lián)變更審查
現(xiàn)在可以直接在編譯器內(nèi)檢查源代碼的更改。這個特性取決于它是否被源代碼提供者支持,但是它已經(jīng)為開箱即用的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、現(xiàn)在建議拓展左上角有一個五角星徽章,以便跟其他拓展插件做區(qū)分
?
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:這部分說明我理解起來感覺特迷糊,各位根據(jù)下圖演示自行體會吧。
?
調(diào)試
1、在下面的狀態(tài)欄中顯示調(diào)試控件
可以不需要切換到調(diào)試界面,就啟用調(diào)試功能并進行簡單的切換。
?
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、運行程序(非調(diào)試模式)的快捷鍵修改以避免鍵盤沖突
為避免macOS系統(tǒng)的鍵盤沖突問題,運行程序(非調(diào)試模式)的快捷鍵修改為 Ctrl + F5
注:控制臺命令為?Debug: Start Without Debugging
?
4、調(diào)試控制臺顯示結(jié)果會根據(jù)類型的展示顏色區(qū)別
調(diào)試控制臺會根據(jù)結(jié)果類型展示不同的顏色,改功能基于Node.js調(diào)試插件。
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.
?
其他
我個人認為接下來的官方更新說明并不是很重要,主要內(nèi)容涉及:主題皮膚、文件內(nèi)容的凸顯、工作空間、開發(fā)者接口、性能上的提升、文件目錄圖標、以及新的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.
有興趣的朋友可以自己去閱讀后面的內(nèi)容(包括前面的)。
?
?
花了將近一天時間翻譯整理出來的,希望看到感覺不錯的朋友能支持下~
?
posted on 2017-11-09 16:10 Rebuilding127 閱讀(...) 評論(...) 編輯 收藏轉(zhuǎn)載于:https://www.cnblogs.com/dmh-blog/p/7809920.html
總結(jié)
以上是生活随笔為你收集整理的VS Code 1.18版本更新内容整理(2017年10月 October 2017)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python_初步
- 下一篇: Teleport Pro使用教程