vscode 快捷键请教。 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Gzilla

vscode 快捷键请教。

  •  
  •   Gzilla Jun 18, 2021 4702 views
    This topic created in 1774 days ago, the information mentioned may be changed or developed.

    今天看黑马程序员视频,视频中的老师操作了一下,感觉很神奇,自己试了许久,也问了一些人,但都得不到正确答案,望各位朋友能解我所惑,不胜感激!

    选中<h> </h>中的所有内容 但是不选中 h 标签

    <h> <view>1</view> <view>2</view> <view>3</view> <view>4</view> <view>5</view> <view>6</view> <view>7</view> <view>8</view> </h> 
    Supplement 1    Jun 18, 2021
    具体的现象我给描述一下, 这个老师将鼠标停在了`<view>1</view>` 这个标签的行首, 然后他用了快捷键 选中了<h> </h> 中的所有内容,包括一些空格。
    Supplement 2    Jun 18, 2021
    解决了,二楼的方式经尝试是我想要的结果。
    18 replies    2021-06-18 15:36:24 +08:00
    yfugibr
        1
    yfugibr  
       Jun 18, 2021 via Android
    alt+鼠标选中?
    noe132
        2
    noe132  
       Jun 18, 2021   1
    安装
    https://marketplace.visualstudio.com/items?itemName=vincaslt.highlight-matching-tag

    绑定快捷键
    @command:highlight-matching-tag.selectPairContents
    rioshikelong121
        3
    rioshikelong121  
       Jun 18, 2021
    这个只能对 jsx 或者 html 起作用。对于代码里面选择括号之间的内容,推荐使用 bracket select 。vscode 原生好像只能在匹配的括号之间跳来跳去,但是没找到直接选择的 keyboard shortcut 。
    Loerise
        4
    Loerise  
       Jun 18, 2021
    vsc keyboard shortcuts 里面搜索 expand selection
    ynyounuo
        5
    ynyounuo  
       Jun 18, 2021   1
    Emmet: Balance (outward)
    MarkLeeyun
        6
    MarkLeeyun  
       Jun 18, 2021
    可能这个老师有自定义 keyboard shortcuts 吧。
    lxd152
        7
    lxd152  
       Jun 18, 2021
    按住鼠标中间从上往下选中数字
    AmoreLee
        8
    AmoreLee  
       Jun 18, 2021
    可以装个 vim 插件,能做到的不止这些
    AmoreLee
        9
    AmoreLee  
       Jun 18, 2021
    @AmoreLee 用 vim 插件后,vit (选中 tag 里面的内容 v in tag) ,就可以选中了。
    Chappako
        10
    Chappako  
       Jun 18, 2021
    是不是装了 vim 插件,然后 vit ?
    grewer
        11
    grewer  
       Jun 18, 2021
    如果你用 jb 快捷键, 可以用 opt+上箭头 慢慢获取
    AEDaydreamer
        12
    AEDaydreamer  
       Jun 18, 2021
    Expand / shrink selection (→ / ←)或者 (→ / ←)
    试试这个
    Gzilla
        13
    Gzilla  
    OP
       Jun 18, 2021
    @AEDaydreamer 可以具体一点吗, 我的 win. 我没有明白您的表述。 具体的现象我给您描述一下, 他将鼠标停在了`<view>1</view>` 这个标签的行首, 然后他用了快捷键 选中了<h> </h> 中的所有内容。
    Gzilla
        14
    Gzilla  
    OP
       Jun 18, 2021
    @yfugibr 不适用鼠标。
    Gea
        15
    Gea  
       Jun 18, 2021
    我只会选中<view> command + L 选中所有行
    AEDaydreamer
        16
    AEDaydreamer  
       Jun 18, 2021
    https://code.visualstudio.com/docs/editor/codebasics#_shrinkexpand-selection
    这是文档里的,你看一下应该就明白了。
    AEDaydreamer
        17
    AEDaydreamer  
       Jun 18, 2021   1
    Shift+Alt+→ Expand selection
    Shift+Alt+← Shrink selection
    Gzilla
        18
    Gzilla  
    OP
       Jun 18, 2021
    解决了,谢谢指导!
    About     Help     Advertise     Blog     API     FAQ     Solana     3318 Online   Highest 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 77ms UTC 13:10 PVG 21:10 LAX 06:10 JFK 09:10
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86