Select current line in intellij

Intellij IdeaIntellij 15

Intellij Idea Problem Overview


Is there any way to select the whole line at caret in IntelliJ 15? I know you can select the current word (ctl + w), go to beginning/end of line but I can't find a current line selection feature.

Intellij Idea Solutions


Solution 1 - Intellij Idea

Simply hit ctrl+c.

Note that for this to select the whole line, you need to ensure that nothing is already selected; otherwise it'll work as an usual "copy" command.

Solution 2 - Intellij Idea

  1. move caret to line
  2. on Windows, press ctrl+shift+a . This popup appears, where you find Select Line at Caret
    enter image description here
  3. for quick access, you can specify a shortcut in Settings enter image description here

Solution 3 - Intellij Idea

I would like to also add the following from JetBrains website. Because, that what i was looking for here, but no one mentioned it.

>1- To select text from the current caret position to the beginning/end of > the current word: > > Ctrl+Shift+Left, Ctrl+Shift+Right. > > 2- To select text from the caret > position to the beginning/end of the current line: > > Double-click Ctrl and press Home/End > > 3- To select text from the current > caret position to the top/bottom of the screen: > > Ctrl+Shift+Page Up, Ctrl+Shift+Page Down.

Solution 4 - Intellij Idea

If none of the above are working, I suggest using end and home keys in combination with shift allowing you to select lines quickly.

Solution 5 - Intellij Idea

Go to the end of the line and hit Ctrl+W. If you'll hit Ctrl+W at the beginning of the line it will select only one word.

Solution 6 - Intellij Idea

Not a keyboard feature, but nice to use: to select the whole row just click on row number on the left of the code.

In addition to that you can click and drag selection.

Moreover, you can doubleclick on the number of the first line of method which results selection of the whole method.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDodiView Question on Stackoverflow
Solution 1 - Intellij Ideagarci560View Answer on Stackoverflow
Solution 2 - Intellij IdeaJimHawkinsView Answer on Stackoverflow
Solution 3 - Intellij IdeaMuath AlshehriView Answer on Stackoverflow
Solution 4 - Intellij IdeacuppajoemanView Answer on Stackoverflow
Solution 5 - Intellij IdeaSanjXView Answer on Stackoverflow
Solution 6 - Intellij IdeaTorinoView Answer on Stackoverflow