How to select/copy current line without using mouse in IntelliJ IDEA

后端 未结 5 635
礼貌的吻别
礼貌的吻别 2020-12-29 19:59

To duplicate lines I use

Ctrl + D

Is there a similar way to select/copy current line using keyboard in IntelliJ IDEA?

相关标签:
5条回答
  • 2020-12-29 20:02

    If you go to the specific line rather at the start or positioned at a specific row and column you can use the CTRL + W to select portions of the text depending on its complexity and language.

    If you are at the start of the line and you want to select the entire text it's going to require to use CTRL + W 2 times, firstly it's going to select the first character and then the entire row till the end.

    0 讨论(0)
  • 2020-12-29 20:21

    CTRL + X CTRL + V

    CTRL + D - duplicate line CTRL + Y - delete line

    0 讨论(0)
  • 2020-12-29 20:23

    If you have nothing selected, I think you can just hit CTRL-C to copy a line (or CTRL-X to cut it)...

    http://grahamhackingscala.blogspot.co.uk/2010/08/fast-quick-line-cut-copy-intellij-idea.html

    Hope this helps.

    0 讨论(0)
  • 2020-12-29 20:23

    In Mac OS ,i would like to keymap :

    Command + D (Duplicate Line Or Selection) ==> Command + D (Duplicate Entire Lines)

    This can duplicate a/multi line with the caret (insertion point) ,work in IntelliJ 2018.1.

    or another way:

    copy multiline with the caret (insertion point),not change keymapp, copy extra newline feed hidden "\n":

    0 讨论(0)
  • 2020-12-29 20:24

    CTRL + C selects the whole line. CTRL + D duplicates the selected line.

    0 讨论(0)
提交回复
热议问题