[英]Visual Studio Code shortcut equivalent to Webstorm / IntelliJ Extend Selection
我已經習慣了Webstorm的“ 擴展選擇 ”快捷方式,它將選擇范圍擴大到下一個特殊角色。
示例(如果光標位於“someObjectProperty”中的某個位置並且快捷方式已激活):
var foo = someObject.someObjectProperty.subProperty;
<-- selection 1 -->
<------ selection 2 --------->
<-------------- selection 3 ------------>
現在我已經切換到Visual Studio Code,最接近我找到的那種類型的快捷方式是' editor.action.smartSelect.grow '快捷方式
然而,雖然它是相似的,但它並不相同。 使用相同的示例(如果光標位於“someObjectProperty”中的某個位置並且快捷方式已激活):
var foo = someObject.someObjectProperty.subProperty;
<---------------- selection 1 -------------->
<------------------- selection 2 ------------------>
如上所述,VS Code中是否有與WebStorm中的Extend Selection類似的內容?
雖然VS Code沒有這樣的快捷方式/命令,但可以輕松安裝第三方擴展:
ext install expand-region
有關expand-region命令的更多信息:
https://marketplace.visualstudio.com/items?itemName=letrieu.expand-region
仍然沒有這樣的東西,第三方插件遠不及Webstorm / Idea所做的,這里是關於如何在同一頁面上不能提及它們的不完整的視覺差距分析 。
您正在尋找的功能稱為縮放擴展選擇。
它的工作原理是:
ALT + SHIFT + →選擇下一部分
ALT + SHIFT + ←選擇前面的部分
它的示例如下所示(假設光標位於someObjectProperty的j上):
var foo = someObject.someObjectProperty.subProperty;
<-S1-> (This section exists because of camelCase)
<- S2 ->
<- S3 ->
<- S4 ->
<- S5 ->
供參考: https : //code.visualstudio.com/docs/getstarted/tips-and-tricks#_shrink-expand-selection
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.