Intellij: How to copy/paste a file in order to duplicate it?

前端 未结 5 1037
孤独总比滥情好
孤独总比滥情好 2021-02-12 10:58

I can not seem to find a way to do this? I have a file named X in some folder, I want to create Y with the same contents in the same directory. The way I do in eclipse is to sel

5条回答
  •  你的背包
    2021-02-12 11:29

    ⌥ + drag

    • Mac
      Press Option key and drag the original file.
    • PC
      Press Alt key and drag the original file.

    You will be prompted for a new name.

    enter image description here

    Works for classes too:

    enter image description here

提交回复
热议问题