mac快捷新建文件

作者:fantouch
链接:https://www.zhihu.com/question/20883777/answer/81780928
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

Automator 新建一个 Application

image

添加一个动作 "Run AppleScript"

mac快捷新建文件_第1张图片
image

代码如下

on run {input, parameters}

    tell application "Finder"
    set selection to make new file at (get insertion location)
    end tell

    return input
end run

保存到 "应用程序"文件夹, 名字姑且叫 "New File.app" 吧.

Finder 工具栏右键, 自定义, 然后把 New File.app 拖上去, 大功告成,

mac快捷新建文件_第2张图片
image

需要时候点击一下, 即可在当前文件夹生成一个空文件.

========================================

如果你用 Alfred 这个神器, 直接敲 new 就可以了.
如图, 刚刚上面造的小工具也可以用 Alfred 调用, 同样好使.

mac快捷新建文件_第3张图片
image

你可能感兴趣的:(mac快捷新建文件)