美文网首页
Xcode实现快速复制行的功能

Xcode实现快速复制行的功能

作者: 千若逸 | 来源:发表于2017-11-09 11:38 被阅读46次

    用惯了AppCode,真的很不习惯Xcode的编辑,连最简单的Cmd+D复制功能都没有。虽然有Xcode插件可以做到,但是因为Xcode因为安全的缘故加强了验证,现在装插件没有以前那么简单,也不想那么麻烦。

    看到V2EX上有一个帖子用Keyboard Maestro实现了复制行功能,但是会改变剪贴板的内容,研究了一下,发现Keyboard Maestro是支持恢复剪贴板内容的。

    结果又搜到了一个别人已经做好的Keyboard Maestro Macro:Duplicate Line [Keyboard Maestro Wiki],需要的可以直接下载,前提是pass the wall

    内容其实也没多复杂,关键在于最后的“Set Clipboard To Past Clipboard 1” 是用于恢复之前的剪贴板内容

    Default Trigger: Hot Key ⌘L

    Actions:

    Type the ⌘Left Arrow Keystroke
    Type the ⇧Down Arrow Keystroke
    Type the ⌘C Keystroke
    Type the Down Arrow Keystroke
    Type the ⌘V Keystroke
    Type the ⇧Up Arrow Keystroke
    Set Clipboard To Past Clipboard 1

    相关文章

      网友评论

          本文标题:Xcode实现快速复制行的功能

          本文链接:https://www.haomeiwen.com/subject/wxepmxtx.html