V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
qdwang
V2EX  ›  Xcode

请教一下, xcode 如何让 option+delete 表现的像 vscode 一样

  •  
  •   qdwang · Oct 8, 2022 · 3154 views
    This topic created in 1307 days ago, the information mentioned may be changed or developed.

    在 vscode 里,按住 option 去按 delete 可以一个单词一个单词的删除。

    但是在 xcode 里,按住 option 去按 delete 会删一大段东西。。。

    有什么办法可以让 xcode 的按住 option 的删除逻辑和 vscode 一样吗?

    5 replies    2022-10-08 21:16:27 +08:00
    minamike
        1
    minamike  
       Oct 8, 2022 via iPhone
    试了下英文是可以一个单词一个单词删除的
    中文只能删除一段
    好像是以段落和空格键来界定删除范围的
    qdwang
        2
    qdwang  
    OP
       Oct 8, 2022
    @minamike 我又试了一下,主要是在 xcode 里,option+delete 会当作空白符不存在,直接一路删掉最近的一个单词。

    但是 vscode 不会,会删到最近一个单词前面停顿一次。

    这个很关键,特别是有多行空行的情况下,如何快速删掉多与空行,xcode 里就很不方便。
    Building
        3
    Building  
       Oct 8, 2022
    Xcode Extensions with Key Bindings
    dingwen07
        4
    dingwen07  
       Oct 8, 2022
    刚试了一下,Xcode 里打开一个源码文件,option+delete 只删除一个单词,没有问题
    qdwang
        5
    qdwang  
    OP
       Oct 8, 2022
    @dingwen07

    ```
    let result = test()



    print(result)
    ^
    比如你光标在这个位置,你按住 option+delete 想删去几行,你会发现 xcode 会一下子把第一行的 test()都删掉

    ```
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5623 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 63ms · UTC 07:22 · PVG 15:22 · LAX 00:22 · JFK 03:22
    ♥ Do have faith in what you're doing.