有没有办法像我们在 Windows 上那样在 Mac OS X 上反转文件选择?

Nic*_*cks 15 finder macos

我是 Windows 操作系统爱好者,但最近我收到了 Mac 笔记本作为礼物。所以现在我只想知道编辑下是否有任何选项可以让我反转我的选择?例如,我只选择我不想要的文件,一旦我使用“编辑”选项单击“反转选择”,所有我没有选择的文件都将被选择。

OS X 中是否也有类似的选项?

slh*_*hck 24

您正在寻找的密钥是Cmd.

选择文件——任何视图都可以工作——然后用鼠标光标移动到文件列表旁边的空白处。按住Cmd并拖动以反转选择:


如果您不想使用鼠标,另一种方法是改用 AppleScript。打开Automator.app,创建一个新的Service。从左侧窗格中,将Run AppleScript拖到右侧,然后粘贴以下内容:*

on run {input, parameters}

  tell application "Finder"
    set inverted to {}
    set fitems to items of window 1 as alias list
    set selectedItems to the selection as alias list
    repeat with i in fitems
      if i is not in selectedItems then
        set end of inverted to i
      end if
    end repeat
    select inverted
  end tell

  return input
end run
Run Code Online (Sandbox Code Playgroud)

将此服务设置为从Finder.app接收无输入。像这样:

将此服务另存为Invert Selection。然后,前往System Preferences » Keyboard » Keyboard Shortcuts,并将您的快捷方式添加到该服务,例如ShiftCmdI

现在,在 Finder 中选择任何文件,然后按快捷方式反转选择。

* 我在Apple 邮件列表上找到了这个,但不知道是谁写的。