Xcode duplicate/delete line

前端 未结 22 1717
不思量自难忘°
不思量自难忘° 2020-12-04 04:59

Coming from Eclipse and having been used to duplicate lines all the time, it\'s pretty strange finding out that Xcode has no such function. Or does it?

I know it\'s

22条回答
  •  不思量自难忘°
    2020-12-04 05:33

    Use user scripts.

    There are scripts to move and delete lines yet. You have to define key binds for those scripts (menu Scripts -> Edit User Scripts..., under xCode 3.2).

    To duplicate line, you have to make your own script. But it's very simple ! Duplicate the "Move Line Down" script and remove the line which delete selected text :

    delete (paragraphs startLine through endLine)
    

提交回复
热议问题