Gzilla

vscode 快捷键请教。

  •  
  •   Gzilla · Jun 18, 2021 · 5367 views
    This topic created in 1964 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
    yfugibr
    Jun 18, 2021 via Android
    1
    alt+鼠标选中?
    noe132
    noe132
    Jun 18, 2021❤️1
    2
    安装
    https://marketplace.visualstudio.com/items?itemName=vincaslt.highlight-matching-tag

    绑定快捷键
    @command:highlight-matching-tag.selectPairContents
    rioshikelong121
    rioshikelong121
    Jun 18, 2021
    3
    这个只能对 jsx 或者 html 起作用。对于代码里面选择括号之间的内容,推荐使用 bracket select 。vscode 原生好像只能在匹配的括号之间跳来跳去,但是没找到直接选择的 keyboard shortcut 。
    Loerise
    Loerise
    Jun 18, 2021
    4
    vsc keyboard shortcuts 里面搜索 expand selection
    ynyounuo
    ynyounuo
    Jun 18, 2021❤️1
    5
    Emmet: Balance (outward)
    MarkLeeyun
    MarkLeeyun
    Jun 18, 2021
    6
    可能这个老师有自定义 keyboard shortcuts 吧。
    lxd152
    lxd152
    Jun 18, 2021
    7
    按住鼠标中间从上往下选中数字
    AmoreLee
    AmoreLee
    Jun 18, 2021
    8
    可以装个 vim 插件,能做到的不止这些
    AmoreLee
    AmoreLee
    Jun 18, 2021
    9
    @AmoreLee 用 vim 插件后,vit (选中 tag 里面的内容 v in tag) ,就可以选中了。
    Chappako
    Chappako
    Jun 18, 2021
    10
    是不是装了 vim 插件,然后 vit ?
    grewer
    grewer
    Jun 18, 2021
    11
    如果你用 jb 快捷键, 可以用 opt+上箭头 慢慢获取
    AEDaydreamer
    AEDaydreamer
    Jun 18, 2021
    12
    Expand / shrink selection (⌃⇧⌘→ / ←)或者 (⌃⇧→ / ←)
    试试这个
    Gzilla
    Gzilla
    OP
    Jun 18, 2021
    13
    @AEDaydreamer 可以具体一点吗, 我的 win. 我没有明白您的表述。 具体的现象我给您描述一下, 他将鼠标停在了`<view>1</view>` 这个标签的行首, 然后他用了快捷键 选中了<h> </h> 中的所有内容。
    Gzilla
    Gzilla
    OP
    Jun 18, 2021
    14
    @yfugibr 不适用鼠标。
    Gea
    Gea
    Jun 18, 2021
    15
    我只会选中<view> command + L 选中所有行
    AEDaydreamer
    AEDaydreamer
    Jun 18, 2021
    16
    https://code.visualstudio.com/docs/editor/codebasics#_shrinkexpand-selection
    这是文档里的,你看一下应该就明白了。
    AEDaydreamer
    AEDaydreamer
    Jun 18, 2021❤️1
    17
    Shift+Alt+→ Expand selection
    Shift+Alt+← Shrink selection
    Gzilla
    Gzilla
    OP
    Jun 18, 2021
    18
    解决了,谢谢指导!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4369 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 03:56 · PVG 11:56 · LAX 19:56 · JFK 22:56
    ♥ Do have faith in what you're doing.